#Mac系统设置 ' # Show hidden files $ defaults write Com.apple.finder appleshowallfiles TRUE $ killall Finder # Disable Dashboard $ defaults Write Com.apple.dashboard Mcx-disabled-boolean YES $ killall Dock "' #SVN ' # View Help $ svn" # Check out $ SVN CO protocol://Road Path Local path--username= user name--password= password # export directory tree without. SVN folder $ SVN export-r version Number protocol://paths Local path--username= user name # Add file $ svn Add File # Submit $ svn ci-m "comment" # delete $ svn del # update $ svn up # View status $ SVN St # restore locally modified $ svn revert # Resolve conflict $ SVN resolved # Create branch $ SV N Copy brancha branchb-m "Copy a new branch from Brancha BRANCHB" # Merge branch (merge changes to Brancha to branch BRANCHB) $ svn merge Brancha Branchb ' #Coco Apods #icon ' 57x57 114x114 120x120 180x180 ' #创建纯代码项目 '-(BOOL) Application: (UIApplication *) Application DIDFINISHL Aunchingwithoptions: (nsdictionary *) launchoptions {Self.window = [[UIWindow alloc] Initwithframe:[uiscreen mainScreen ].bounds]; Self.window.rootViewController = [[Viewcontroller alloc] init]; [Self.window makekeyandvisible]; return YES; } ' #隐藏状态栏 '-(BOOL) PrefeRsstatusbarhidden {return YES;} "#结束键盘输入" [Self.view Endediting:yes]; ' #字典转模型 '-(instancetype) Initwithdict: (nsdictionary *) dict{if (self = [super init]) {[Self setvaluesforkeyswithdic TIONARY:DICT]; } return self; } + (Instancetype) modelwithdict: (nsdictionary *) dict{return [[Self alloc] initwithdict:dict];} ""-(Instancetype) I Nitwithdict: (nsdictionary *) dict{if (self = [super init]) {[Self setvaluesforkeyswithdictionary:dict]; Nsmutablearray *temparray = [Nsmutablearray array]; For (Nsdictionary *dict in self.models) {model *model = [model modelwithdict:dict]; [Temparray Addobject:model]; } self.models = Temparray; } return self; } + (Instancetype) groupwithdict: (nsdictionary *) dict{return [[Self alloc] initwithdict:dict];} ' #懒加载 '-(Nsarray * ) groups{if (_groups = = nil) {Nsarray *dictarray = [Nsarray arraywithcontentsoffile:[[nsbundle MAINBUNDLE]PATHFORRESOURC e:@ "Test" oftype:@ "plist"]; Nsmutablearray *temparray = [Nsmutablearray array]; for (nsdictIonary *dict in Dictarray) {Groupmodel *group = [Groupmodel groupwithdict:dict]; [Temparray Addobject:group]; } _groups = Temparray; } return _groups; } ' #应用间跳转 in info.plist: * Add URL types-url schemes and set URL identifier * Add App Transport Security Settings Allow arbitrary Loads set to Yes * Add Lsapplicationqueriesschemes array, which holds each custom protocol * Write code: "' UIApplication *app = [Uiapplicati On sharedapplication]; Nsurl *url = [Nsurl urlwithstring:@ "Testa://com.iospp.a"]; if ([app Canopenurl:url]) {[app Openurl:url];} '
iOS Development Notes