nsarray - Changing line of word numbers into numbers objective c -
Hi, I'm starting an object and it is played with just a code that I'm getting from a developer Words number (two hundred and thirty two) in numbers (232) I have managed to get one word to change another word, but I can not understand how to link words with intervals. So changed to twenty-20, but twenty two does not return anything. ?
do any suggestions happy // text recognition NSArray * value = [[NSArray alloc] initWithObjects: @ "0", @ "1", "2" @, @ "3 ", @" 4 ", @" 5 6 ", @" ", @" 7 8 ", @" ", @" 9 ", zero]; NSArray * key = [[NSArray alloc] initWithObjects: @ "zero", @ "a" @ "two", @ "three", @ "four", @ "five", @ "six" @ "Seven" @ "Eight", @ "nine", zero]; Numbers = [[NSDO official] initWithObjects: value keys for: key]; In the (item.attachments NSItemProvider * itemProvider) (// PASSED text NSExtensionItem * item) {in self.extensionContext.inputItems {// NSLog (@ "% @", itemProvider); If ([itemProvider hasItemConformingToTypeIdentifier: (NSString *) kUTTypePropertyList]) {// Safari __weak ActionViewController * sself = self; [ItemProvider loadItemForTypeIdentifier: (NSString *) kUTTypePropertyList options: 0 completionHandler: ^ (ID & lt; NSSecureCoding & gt; before, NSError * error) {if (! Item = null) {NSDictionary * resultDict = (NSDictionary *) items; Sself.jsString = As a result [NSExtensionJavaScriptPreprocessingResultsKey] [@ "selection"]; // Update UI // .......... I've cut some code - (minus) selection {// text recognition if ([self.jsString isEqualToString: @ ""]) {[_calculations setText: @ "0"]; } Else {for (NSString * key in number) {[_calculations setText: self.jsString]; If ([self.jsString caseInsensitiveCompare: key] == NSOrderedSame) {[_calculations setText: [numbers objectForKey: key]]; break; }}}
Comments
Post a Comment