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

后端 未结 5 1265
挽巷
挽巷 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:47

    Change region to United states i.e locale settings

    NSLocale *locale = [[NSLocale alloc] initWithLocaleIdentifier:@"US"];
            [datePicker setLocale:locale];
    

提交回复
热议问题