摘要:
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 阅读全文
摘要:
View Code 1、如何如何将一个字符串如“ 20110826134106”装化为任意的日期时间格式,下面列举两种类型: NSString* string = @"20110826134106"; NSDateFormatter *inputFormatter = [[[NSDateFormatter alloc] init] autorelease]; [inputFormatter setLocale:[[[NSLocale alloc] initWithLocaleIdentifier:@"en_US"] autorelease]]; [inp 阅读全文
摘要:
// 隐藏手机号码6-10位显示*- (NSString *)ConvertStr:(NSString *)str{ NSMutableString * phoneStr = [NSMutableString stringWithString:str]; [phoneStr replaceCharactersInRange:NSMakeRange(6, 4) withString:@"****"]; return phoneStr;} 阅读全文