I have text bot i want that when i enter any value like 3 in that then it should mulitpy by 12 and display 36 on button title automatically when i enter any number in text field the title should change i am adding following code but it alwasy shows zero i am adding this code in viewdidLoad
float monthText = [[monthTextField text] floatValue];
float year=12;
float monthButtonTitle=monthText*year;
NSString *titleMonth = [NSString stringWithFormat:@"%d",monthButtonTitle];
[monthButton setTitle:titleMonth forState:UIControlStateNormal];
Add action to your textfield like this
Then implement method textFieldTextDidChange: like this