How can i display the UIDatePicker
with format HH:MM:SS
as there is no mode for this in UIDatePicker
.Currently it is showing the date and time.I get to know that ,I have to use NSDate
format .But I don't know how to use it.
I need to do this As I am getting the value in a format HH:MM:SS
. need to display it on the picker and then change to any value after that have to save it .
below is the code that I use to create the custom picker.
CGRect pickerFrame = CGRectMake(0,self.view.bounds.size.height-250,0,0);
UIDatePicker *myPicker = [[UIDatePicker alloc] initWithFrame:pickerFrame];
myPicker.backgroundColor = [UIColor lightTextColor];
myPicker.layer.cornerRadius = 10;
myPicker.layer.masksToBounds=YES;
How and where can I use the formatter so that it display the following format .
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"HH:mm:ss"];