At any time, when you have disappointment in the lines “why this line doesn’t work”, use the debugger or simply add an NSLog before this to print the relevant data:
NSLog(@"updateDays: %@ %@ <= %@", daysTextField, daysTextField.text, daysString);
Then you know that line (a) is executed, (b) the variables are the ones you consider them, and (c) the values are reasonable.
source
share