摘要: View Code NSString *deviceType = [UIDevice currentDevice].model; if([deviceType isEqualToString:@"iPod touch"]||[deviceType isEqualToString:@"iPad"]||[deviceType isEqualToString:@"iPhone Simulator"]){// UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"提示&quo 阅读全文
posted @ 2013-04-28 13:48 菜鸟程序猿 阅读(1586) 评论(0) 推荐(0) 编辑
摘要: View Code 1、如何如何将一个字符串如“ 20110826134106”装化为任意的日期时间格式,下面列举两种类型: NSString* string = @"20110826134106"; NSDateFormatter *inputFormatter = [[[NSDateFormatter alloc] init] autorelease]; [inputFormatter setLocale:[[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease]]; [inp 阅读全文
posted @ 2013-04-28 10:40 菜鸟程序猿 阅读(500) 评论(0) 推荐(0) 编辑
摘要: // 隐藏手机号码6-10位显示*- (NSString *)ConvertStr:(NSString *)str{ NSMutableString * phoneStr = [NSMutableString stringWithString:str]; [phoneStr replaceCharactersInRange:NSMakeRange(6, 4) withString:@"****"]; return phoneStr;} 阅读全文
posted @ 2013-04-28 09:21 菜鸟程序猿 阅读(632) 评论(0) 推荐(0) 编辑