How to display picker view in MM-dd-yy format in iOS 5.1?

后端 未结 5 1269
挽巷
挽巷 2020-12-06 10:51

In my application i am using pickerview

My problem is that when in iOS 4.3 Picker view comes MM-dd-yy format,

5条回答
  •  生来不讨喜
    2020-12-06 11:50

    In iOS 5.1 display UIDatePicker as it is in 4.3

    Your and mine both of code is same but in my application UIDatePicker display
    with MM-dd-yyyy

    Use it ...may be helpful for you.

       self.DatePicker= [[UIDatePicker alloc] initWithFrame:CGRectMake(0, 0, 320, 216)];
        self.DatePicker.datePickerMode = UIDatePickerModeDate;
        [self.DatePicker addTarget:self
                       action:@selector(SetDatePickerTime:)
             forControlEvents:UIControlEventValueChanged];
        [self.asheet addSubview:self.DatePicker];
    

提交回复
热议问题