• weak_shortcut
/** <#注释#> */
@property(nonatomic,weak) <#class#> *<#name#>;
  • copy_shortcut
/** <#注释#> */
@property(nonatomic,copy) NSString *<#name#>;
  • bool_shortcut
/** <#注释#> */
@property(nonatomic,assign) BOOL <#name#>;
  • block_shortcut
/** <#注释#> */
@property(nonatomic,copy) <#MyBlock#> <#blockName#>;
  • assign_shortcut
/** <#注释#> */
@property(nonatomic,assign) <#class#> <#name#>;
  • lazy_shotcut
- (<#class#> *)<#name#> {
if (_<#name#> == nil) {
_<#name#> = [[<#class#> alloc] init];
}
return _<#name#>;
}
  • setupTableView_snapshot
- (void)setupTableView {

    self.myTableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 0, 10)];
self.myTableView.tableFooterView = [UIView new];
self.myTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.myTableView.mj_header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(<#method#>)];
[self.myTableView.mj_header beginRefreshing]; self.myTableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(<#method#>)];
self.myTableView.mj_footer.hidden = YES;
}
  • tableviewDelegate&Datasource_snapshot
#pragma mark - UITableViewDelegate, UITableViewDataSource

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return <#number#>;
} - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
return <#number#>;
} - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
return <#number#>;
} - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return <#number#>;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
NSInteger row = indexPath.row;
NSInteger section = indexPath.section;
return <#number#>;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSInteger section = indexPath.section;
NSInteger row = indexPath.row;
UITableViewCell *cell; return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
DLog(@"");
}
  • mark_shortcut
#pragma mark - <#mark#>

Xcode 常用代码段的更多相关文章

  1. PyTorch常用代码段整理合集

    PyTorch常用代码段整理合集 转自:知乎 作者:张皓 众所周知,程序猿在写代码时通常会在网上搜索大量资料,其中大部分是代码段.然而,这项工作常常令人心累身疲,耗费大量时间.所以,今天小编转载了知乎 ...

  2. Xcode常用代码块

    Xcode的代码片段(Code Snippets)创建自定义的代码片段,当你重用这些代码片段时,会给你带来很大的方便. 常用的: 1.strong:@property (nonatomic,stron ...

  3. Xcode 自定义代码段

    看见老师敲程序时,快捷键一打,所需要的一整行代码都出来了,着实感觉到效率太高了. 看了几天,才反应过来为什么自己没有get这个方法呢,现在就整理一番,记录一下. 此处以@property(nonato ...

  4. Java常用代码段 - 未完待续

    记录一些自己写项目常用的代码段. 格式化常用日期格式 Date date = new Date(System.currentTimeMillis()); DateFormat d3 = DateFor ...

  5. PyTorch 常用代码段整理

    基础配置 检查 PyTorch 版本 torch.__version__               # PyTorch version torch.version.cuda              ...

  6. JavaScript常用代码段

    总结一下在各种地方看到的还有自己使用的一些实用代码 1)区分IE和非IE浏览器 if(!+[1,]){ alert("这是IE浏览器"); } else{ alert(" ...

  7. C#获取本地IP地址[常用代码段]

    获得当前机器的IP代码,假设本地主机为单网卡 string strHostName = Dns.GetHostName(); //得到本机的主机名 IPHostEntry ipEntry = Dns. ...

  8. Erlang常用代码段

    十六进制字符串转为二进制 hex_to_bin(Bin) -> hex2bin(Bin). hex2bin(Bin) when is_binary(Bin) -> hex2bin(bina ...

  9. php常用代码段

    点击换验证码 <a href=" src="{:U('Reglog/vcode')}" /></a> TP上一条下一条 $prev=$artica ...

随机推荐

  1. Axis2部署后服务器端出现异常信息

    客户端可以正常调用Web Service,但服务端控制台报出如下异常:2013-09-05 09:49:12,965:[http-8080-2] at org.apache.axis2.dataret ...

  2. [IOI2014]Wall

    [IOI2014]Wall 题目大意: 给你一个长度为\(n(n\le2\times10^6)\)的数列,初始全为\(0\).\(m(m\le5\times10^5)\)次操作,每次让区间\([l_i ...

  3. python数据类型及基本运算符

    1.数据类型 (1)什么是数据类型? 变量值是我们存储的数据,所以数据类型就是变量值的不同种类 (2)为什么要分类型? 变量值是为了保存现实世界中的状态,针对于不同的状态应该用不同的类型去表示 (3) ...

  4. [UVA227][ACM/ICPC WF 1993]Puzzle (恶心模拟)

    各位大佬都好厉害…… 这个ACM/ICPC1993总决赛算黄题%%% 我个人认为至少要绿题. 虽然算法上面不是要求很大 但是操作模拟是真的恶心…… 主要是输入输出的难. 对于ABLR只需要模拟即可 遇 ...

  5. python网络编程(四)

    TFTP客户端 1. TFTP协议介绍 TFTP(Trivial File Transfer Protocol,简单文件传输协议) 是TCP/IP协议族中的一个用来在客户端与服务器之间进行简单文件传输 ...

  6. Android requestcode resultcode的作用

    requestcode 一个页面的不同事件,激发不同的函数,startActivityForResult中传入不同的请求码的值以调用下一个界面,在被调用界面结束返回第一个界面时,请求码会自动返回(自动 ...

  7. Maven实战(八)——常用Maven插件介绍(下)

    我们都知道Maven本质上是一个插件框架,它的核心并不执行任何具体的构建任务,所有这些任务都交给插件来完成,例如编译源代码是由maven- compiler-plugin完成的.进一步说,每个任务对应 ...

  8. weblogic 内存配置

    修改weblogic 使用内存 修改位置:startWeblogic.sh 在最开头增加使用内存配置信息如下: 我的服务器配置 内存:32G   ,CPU:16  根据实际情况配置 #!/bin/sh ...

  9. 关于UITableView的一些老是忘记的小杂碎

    1:如何取消单元格的选中状态 简简单单的一句 [TableView deselectRowAtIndexPath:[TableView indexPathForSelectedRow] animate ...

  10. 【枚举】Consonant Fencity @upcexam5110

    时间限制: 3 Sec 内存限制: 512 MB 题目描述 There are two kinds of sounds in spoken languages: vowels and consonan ...