平时积累

NSStirng去除空格
[someStr stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
替换NSString中的回车 空格 或者 \n
stringElementValue = [stringElementValue stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
获取info.plist文件中的值:
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]
不让手机处于休眠状态
[[UIApplication sharedApplication] setIdleTimerDisabled:YES];

你可能感兴趣的:(平时积累)