一、完整项目开发流程: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"); }