一、完整項目開發流程:android
產品經理作需求調研,編寫需求ios
產品經理完成產品原型服務器
項目經理開會app
美工配合產品經理出效果圖,剪切圖ide
ios,android分析須要分配任務,項目經理制定開發進度svn
服務端和客戶端制定接口工具
客戶端根據需求完成文檔ui
二、版本控制的做用atom
多人協做開發項目:每一個只修改本身的模板,修改事後須要同步每一個修改版本控制,每一個階段代碼都有版本spa
解決方法:使用版本控制工具
工具:SVN GIB(開源世界比較流行)
三、Versions的使用
一、鏈接到SVN服務器
利用Versions工具
二、導入新的工程
原來的工程沒有svn,能夠刪除原來的工程
三、檢出checkout
檢出的項目,有svn文件夾
四、更新 upadate (一更新別人的修改)
五、修改代碼以後 commit ,版本號Base會改變
*/
四、封裝Button和UIView
#import <UIKit/UIKit.h> @interface ZJButton : UIButton //點擊後 執行block //注意:block的屬性修飾符必須是copy
@property(copy,nonatomic)void(^action)(UIButton *button); @end #import "ZJButton.h" @implementation ZJButton /* // Only override drawRect: if you perform custom drawing. // An empty implementation adversely affects performance during animation. - (void)drawRect:(CGRect)rect { // Drawing code } */
-(instancetype)initWithFrame:(CGRect)frame { if (self=[super initWithFrame:frame]) { [self addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside]; } return self; } //讓其去轉而去執行block
-(void)btnClick:(UIButton *)button { if (self.action) { self.action(self); } } @end //=========================================
#import <UIKit/UIKit.h> @interface UIView (LCQuickControl) //添加系統按鈕 void(^action)(UIButton *button)
-(UIButton *)addSystemButtonWithFrame:(CGRect )frame title:(NSString *)title action:(void(^)(UIButton *button))action; //添加圖片按鈕
-(UIButton *)addImageButtonWithFrame:(CGRect )frame title:(NSString *)title background:(NSString *)backgroud action:(void(^)(UIButton *button))action; //添加圖片視圖
-(UIImageView *)addImageViewWithFrame:(CGRect)frame image:(NSString *)image; //添加lebel
-(UILabel *)addLabelWithFrame:(CGRect)frame text:(NSString *)text; @end #import "UIView+LCQuickControl.h" #import "ZJButton.h" @implementation UIView (LCQuickControl) //添加系統按鈕
-(UIButton *)addSystemButtonWithFrame:(CGRect)frame title:(NSString *)title action:(void (^)(UIButton *))action { ZJButton *button=[ZJButton buttonWithType:UIButtonTypeSystem]; button.frame=frame; [button setTitle:title forState:UIControlStateNormal]; button.action=action; [self addSubview:button]; return button; } //添加圖片按鈕
-(UIButton *)addImageButtonWithFrame:(CGRect )frame title:(NSString *)title background:(NSString *)backgroud action:(void(^)(UIButton *button))action { ZJButton *button=[ZJButton buttonWithType:UIButtonTypeCustom]; button.frame=frame; [button setTitle:title forState:UIControlStateNormal]; [button setBackgroundImage:[UIImage imageNamed:backgroud] forState:UIControlStateNormal]; button.action=action; [self addSubview:button]; return button; } //添加圖片視圖
-(UIImageView *)addImageViewWithFrame:(CGRect)frame image:(NSString *)image { UIImageView *imageView=[[UIImageView alloc]initWithFrame:frame]; imageView.image=[UIImage imageNamed:image]; imageView.userInteractionEnabled=YES; [self addSubview:imageView]; return imageView; } //添加lebel
-(UILabel *)addLabelWithFrame:(CGRect)frame text:(NSString *)text { UILabel *label=[[UILabel alloc]initWithFrame:frame]; label.text=text; [self addSubview:label]; return label; } @end
五、很是簡單獲取model的屬性的方法
NSDictionary *dict=[NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil]; NSArray *appList=dict[@"applications"]; for (NSDictionary *appDict in appList) { [self createModelCodeWithDictionary:appDict name:@"model" } } 。。。。。。 -(void)createModelCodeWithDictionary:(NSDictionary *)dict name:(NSString *)name { printf("\n@interface %s : NSOBject\n",name.UTF8String); for (NSString *key in dict) { printf("@property(nonatomic,copy)NSString *%s;\n",key.UTF8String); } printf("@end\n"); }