UITextField *textField;
NSInteger intRollNumber;
I want to take rollNumber as input from the textField and store the value into intRollNumber .
How i do that? Because I am unable to convert the string into integer.
Like this?
NSString *str = [textField text]
int RollNumber = [str intValue];
See the text property and integerValue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With