views:

508

answers:

2

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.

+2  A: 

See the text property and integerValue.

Matthew Flaschen
+9  A: 

Like this?

NSString *str = [textField text]
intRollNumber = [str intValue];
dermdaly