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
Post a Comment