I have an issue with UITextField
I want user enter the date to run notification and I use this in .m
[dateComponent setWeekday:1]; // For sunday
[dateComponent setHour:timeHClass];
[dateComponent setMinute:timeMClass];
and this in .h
@property (retain, nonatomic) IBOutlet UITextField *timeHClass;
@property (retain, nonatomic) IBOutlet UITextField *timeMClass;
but it shows me this warning:
incompatible pointer to integer sending 'UiTextField*__strong' to parameter of type 'NSInteger' (aka 'long')
You should be doing:
You want to get the text typed in the field and use it with your date component.
Explanation:
timeHClassobject is anUITextFieldso you want to access thetextproperty of it, which is anNSStringobject, and convert it to anNSIntegervalue. You should also make sure that your text field is numeric.