2011-11-02 13 views

risposta

31

Vedere CGPointFromString (documentazione nel collegamento). La stringa deve essere nel formato {x,y} modo che avrebbe bisogno di aggiungere quelli per l'input dell'utente da soli:

CGPoint myPoint = CGPointFromString([NSString stringWithFormat:@"{%@}",textField.text]); 

tornerà CGPointZero se la stringa non è valido.