For example,
An NLTagger has this function where you pass options:
[_lexicalClassTagger enumerateTagsInRange:NSMakeRange(0, string.length)
unit:NLTokenUnitWord
scheme:NLTagSchemeLexicalClass
options:(NLTaggerOmitPunctuation |
NLTaggerOmitWhitespace |
NLTaggerOmitOther)
usingBlock:^(NLTag _Nullable tag,
NSRange tokenRange,
BOOL * _Nonnull stop){
if (tag == NLTagNoun) {
// Do something...
}
}];
How can I create my own custom function where I can pass through options-like parameters in the same format?
(NLTaggerOmitPunctuation | NLTaggerOmitWhitespace | NLTaggerOmitOther)
A custom method like:
- (void)performActionsWithOptions:(CustomClassOptions)customClassOptions;
Call it like:
[customClass performActionsWithOptions:(CustomClassOption1 | CustomClassOption2)];
I can't figure out the data type since options in the example above is of type "NLTaggerOptions".