iOS Development Notes

Source: Internet
Author: User

#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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.