Ho bisogno di ottenere il valore numerico di inizio e fine di un intervallo UIText. Finora posso solo stampare la descrizione come una stringa.Obiettivo C come ottenere il valore numerico di una UITextPosition
Dall'osservazione del SelectedRange selezionato, deduco che si tratti di una struttura? Come ottengo un elemento di una struct?
UITextRange *selectedRange = [myTextView selectedTextRange];
NSLog(@"selectedRange.start %@, selectedRange.end %@ ", selectedRange.start.description, selectedRange.end.description);
Ecco la descrizione:
2013-03-26 13:44:03.127 AttributedString[24678:907] selectedRange.start <UITextPosition: 0x1ead8f10, 8, {"Rrrttgh "}, {"gggggh ggg..."}>, selectedRange.end <UITextPosition: 0x1eaf7860, 14, {"...tgh gggggh"}, {" gggg"}>