摘要:
class func sharedInstance()-> GlobalConstant { struct YRSingleton{ static var predicate:dispatch_once_t = 0 static var instance:GlobalCon... 阅读全文
摘要:
let storyBoard:UIStoryboard! = UIStoryboard(name: "Main", bundle: nil)let deskVC:DeskViewController! = storyboard!.instantiateViewControllerWithIdenti... 阅读全文
摘要:
NSString*imageDir = [NSStringstringWithFormat:@"%@/Caches/%@",NSHomeDirectory(), dirName];BOOLisDir =NO;NSFileManager*fileManager = [NSFileManagerdefa... 阅读全文
摘要:
1,测试一for(int i=0;i<1000000000;i++) { NSLog(@"i = %d",i);}2,测试二for(int i=0;i<1000000000;i++) { NSLog(@"i = %d",i); NSString *str =... 阅读全文
摘要:
UISwitch *noticeSwtich = [[UISwitch alloc] initWithFrame:CGRectMake(0, 0, 51, 31)];// noticeSwtich.layer.cornerRadius = noticeSwtich.he... 阅读全文
摘要:
上一篇文章 (SVN 使用)是针对于客户端,本文是说明如何在本地设置服务端 1,建立服务端站点 2,终端进入svn 里的conf 文件夹 vi svnserve.conf,进入编辑模式(按下i),将下列配置项的#和空格都去掉 anon-access = read代表匿名访问的时候是只读的,若改为an 阅读全文
摘要:
NSString *password = @"12 34";[password stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; 阅读全文
摘要:
//利用正则表达式验证邮箱的合法性-(BOOL)isValidateEmail:(NSString *)email { NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}"; NSPredicate... 阅读全文
摘要:
NSNumberFormatter *numFormatter = [[NSNumberFormatter alloc] init]; NSNumber *firstNum = [NSNumber numberWithInt:2]; //NSNumber 转为 NSStr... 阅读全文
摘要:
//UIImage 转为 NSData NSData *imageData = UIImagePNGRepresentation(aImage);//NSData 转为 UIImage UIImage *newImage = [UIImage imageWithData:imageDat... 阅读全文