I cannot get my app to return the value from the DatePicker, and it is incredibly frustrating.
Can anyone help with suggestions to create a DatePicker, initialize it, set it to spit out the current selection to an NSString?
I really need help.
Thanks.
Here's what I have so far:
-(void) createPicker
{
myDatePicker = [[UIDatePicker alloc] awakeFromNib];
NSDateFormatter* dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateStyle:NSDateFormatterNoStyle];
[dateFormatter setTimeStyle:NSDateFormatterShortStyle];
theTime= [dateFormatter stringFromDate:[NSDate date]];
}
And I'm currently receiving a warning "void value not ignored as it ought to be"... a warning I was not receiving before today (after changing too much code to remember).
Can anyone help with suggestions to create a DatePicker, initialize it, set it to spit out the current selection to an NSString?
I really need help.
Thanks.
Here's what I have so far:
-(void) createPicker
{
myDatePicker = [[UIDatePicker alloc] awakeFromNib];
NSDateFormatter* dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateStyle:NSDateFormatterNoStyle];
[dateFormatter setTimeStyle:NSDateFormatterShortStyle];
theTime= [dateFormatter stringFromDate:[NSDate date]];
}
And I'm currently receiving a warning "void value not ignored as it ought to be"... a warning I was not receiving before today (after changing too much code to remember).