zoukankan      html  css  js  c++  java
  • 常用的code snipper

    Xcode 10.2.1 版本,自动代码提示功能延迟很大,很多情况下代码提示甚至会无效,但是code snippet 唤起的响应很快,从提高效率的情况考虑,即使系统提供的代码提示制作成code snippet也是合适的。

    一下记录常用的code snippet 

    1,

    @interface <#statement#>()

    <#statement#>

    @end

    2,

    - (void)setBaseProperty{

        <#statement#>

    }

    3,

    -(void)addDataToSubviewsWithModel:(<#statement#> *)model{

        

    }

    4,

    if (self == [super init]) {

        <#statement#>

        }

        return self;

    5,

    - (instancetype)initWithFrame:(CGRect)frame{

        if (self == [super initWithFrame:frame]) {

            <#statement#>

        }

        return self;

    }

    6,

    @property (nonatomic,assign) <#statement#> <#statement#>;

    7,

    @property (nonatomic ,copy) <#statement#> *<#statement#>;

    8,

    @property (nonatomic ,strong) <#statement#> *<#statement#>;

    9,

    @property (nonatomic ,weak) <#statement#> <#statement#>;

    10,

    @protocol  <#statement#>Protocol<NSObject>

    // loading

    - (void)presenterStartLoading;

    - (void)presenterEndLoading;

    // 加载数据

    -(void)presenterLoadDataSuccess:(<#statement#> *)model;

    -(void)presenterLoadDataError:(NSError *)error;

    @end

    @interface <#statement#> : NSObject

    - (instancetype)initWithDelegate:(id<<#statement#>>) delegate;

    - (void)presenterLoadData;

    @end

    11,

    @interface <#modelName#>Protocol <NSObject>

    - (void)modelLoadDataSuccess:(NSMutableArray *)dataArray;

    @end

    @interface <#modelName#> : NSObject

    - (instancetype)initWithDelegate(id<<#protocolName#>>) delegate;

    - (void)modelLoadData;

    @end

  • 相关阅读:
    《编译原理》-用例题理解-自顶向下语法分析及 FIRST,FOLLOW,SELECT集,LL(1)文法
    8 张脑图入门 JavaScript
    Navicat Premium 12连接Oracle时提示oracle library is not loaded的问题解决
    Spring boot 多模块项目 + Swagger 让你的API可视化
    Spring Boot -05- 多模块结构项目构建与测试(详细图文教程)IDEA 版
    JAVA 实现 QQ 邮箱发送验证码功能(不局限于框架)
    SSM 项目从搭建爬坑到 CentOS 服务器部署
    LeetCode
    有趣的位运算
    记一次向maven中央仓库提交依赖包
  • 原文地址:https://www.cnblogs.com/huaida/p/11155928.html
Copyright © 2011-2022 走看看