人在千锋--网络学习之开发项目爱限免

1、完整项目开发流程:

    产品经理做需求调研,编写需求

    产品经理完成产品原型

    项目经理开会

    美工配合产品经理出效果图,剪切图

    ios,android分析需要分配任务,项目经理制定开发进度

    服务端和客户端制定接口

    客户端根据需求完成文档

 

 2、版本控制的作用

    多人协作开发项目:每个只修改自己的模板,修改过后需要同步每个修改版本控制,每个阶段代码都有版本

    解决方法:使用版本控制工具

    工具:SVN  GIB(开源世界比较流行)

 

 3、Versions的使用

    1、连接到SVN服务器

        利用Versions工具

    2、导入新的工程

        原来的工程没有svn,可以删除原来的工程

    3、检出checkout

        检出的项目,有svn文件夹

    4、更新 upadate (一更新别人的修改)

    5、修改代码之后 commit ,版本号Base会改变

 */

 4、封装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

5、非常简单获取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"); }

 

你可能感兴趣的:(学习)