开发者

Supported NSDateFormatters for iPhone 3G?

开发者 https://www.devze.com 2023-04-12 12:19 出处:网络
My iphone application having the Date Picker option. It is working fine in 3GS and above iphone devices. But, Date picker is some times getting crash in iPhone 3G. I have used some NSDateFormatters in

My iphone application having the Date Picker option. It is working fine in 3GS and above iphone devices. But, Date picker is some times getting crash in iPhone 3G. I have used some NSDateFormatters in Date Picker 'Done' button. I think the NSDateFormatter is not supporting in 3G. Can anyone suggest the available/supporting NSDateFormatters in 3G? Below i have mentioned some NSDateFormatters that i has used in my code. Please help me to solve this problem.

[outputFormatter setDateFormat:@"hh:mm:ss"];
[outputFormatterT setDateFormat:@"hh:mm:ssa"];
[outputFormatter1 setDateFormat:@"h:mm aaa"];

NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init]; [outputFormatter setDateFormat:@"hh:mm:ss"]; NSDateFormatter *outputFormatterT = [[NSDateFormatter alloc] init]; [outputFormatterT setDateFormat:@"hh:mm:ssa"]; NSString *timeStrT = [outputFormatterT stringFromDate:[timePicker date]]; NSDateFormatter *outputFormatter1 = [[NSDateFormatter alloc] init]; outputFormatter1 setDateF开发者_如何学Goormat:@"h:mm aaa"]; NSString *str = [outputFormatter1 stringFromDate:[timePicker date]];

and also i has used stringAppendingString format also, i cant replicate the crashing issue. Thanks in advance. Please edit my question.


Thanks for spending your valuable time with me. I have found an answer for my question. The problem is when the user change their Time Format to 24 hours the app is getting crash in all mobiles (3g, 3gs and above). Once again i thank you all.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号