美文网首页
ios 项目工程规范

ios 项目工程规范

作者: Chevee | 来源:发表于2019-08-15 15:50 被阅读0次

    1.项目工程目录结构

    image.png

    补充:对于UI的文件结构采用MVC结构模式,且功能细分程度为在单个功能文件夹里不能超过8个类文件

    2.类实现文件结构

    #pragma mark - Lifecycle
    - (instancetype)init {} 
    - (void)viewDidLoad {} 
    - (void)viewWillAppear:(BOOL)animated {} 
    - (void)didReceiveMemoryWarning {}  
    - (void)dealloc {} 
    
    #pragma mark – Received Event
    - (void)addNotify {}
    - (void)receivedNotice:(NSNotification *)notice {}
    
    #pragma mark – Button Action
    - (void)submitData:(UIButton *)sender {}
    
    #pragma mark - Public
    - (void)publicMethod {}
    
    #pragma mark - Private
    - (void)privateMethod {}
    
    #pragma mark – Timer
    - (void)addTimer {}
    - (void)removeTimer {}
    
    #pragma mark - UITextFieldDelegate
    #pragma mark - UITableViewDataSource
    #pragma mark - UITableViewDelegate
    #pragma mark - NSCopying
    - (id)copyWithZone:(NSZone *)zone {}  
    
    #pragma mark - NSObject
    - (NSString *)description {}
    
    #pragma mark – Getter
    - (id)customProperty {} 
    
    #pragma mark – Setter
    - (void)setCustomProperty:(id)value {} 
    

    相关文章

      网友评论

          本文标题:ios 项目工程规范

          本文链接:https://www.haomeiwen.com/subject/lpvzjctx.html