With this code:
NSDataDetector *detector = [NSDataDetector dataDetectorWithTypes:NSTextCheckingTypeLink
error:&error];
I am getting this warning:
Implicit conversion from enumeration type 'enum NSTextCheckingType' to different enumeration type 'NSTextCheckingTypes' (aka 'enum NSTextCheckingTypes')
Can someone explain to me why I am getting this warning and how to fix it?
+dataDetectorWithTypes:
does claim to take a value from the NSTextCheckingTypes enum rather than NSTextCheckingType, but going by the rest of its documentation it should indeed allow you to specify individual values from the latter enum. I would just add a cast to NSTextCheckingTypes. You might also want to file a bug on the API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With