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:
timeHClass
object is anUITextField
so you want to access thetext
property of it, which is anNSString
object, and convert it to anNSInteger
value. You should also make sure that your text field is numeric.