objective c - Get int value of UITextField -


i'm trying int value of uitextfield. have set keyboard type to:

textfield.keyboardtype = uikeyboardtypenumberpad; 

and try int value this:

nslog:([nsstring stringwithformat:@"%i", [textfield.text intvalue]]); 

even though enter integers returns 0. whats wrong?

my guess is, textfield nil. outlet set correctly? outlet property , access self.textfield.text.

you log textfield , see if nil.


Comments

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -