Xcode 常用代码段
- 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 常用代码段的更多相关文章
- PyTorch常用代码段整理合集
PyTorch常用代码段整理合集 转自:知乎 作者:张皓 众所周知,程序猿在写代码时通常会在网上搜索大量资料,其中大部分是代码段.然而,这项工作常常令人心累身疲,耗费大量时间.所以,今天小编转载了知乎 ...
- Xcode常用代码块
Xcode的代码片段(Code Snippets)创建自定义的代码片段,当你重用这些代码片段时,会给你带来很大的方便. 常用的: 1.strong:@property (nonatomic,stron ...
- Xcode 自定义代码段
看见老师敲程序时,快捷键一打,所需要的一整行代码都出来了,着实感觉到效率太高了. 看了几天,才反应过来为什么自己没有get这个方法呢,现在就整理一番,记录一下. 此处以@property(nonato ...
- Java常用代码段 - 未完待续
记录一些自己写项目常用的代码段. 格式化常用日期格式 Date date = new Date(System.currentTimeMillis()); DateFormat d3 = DateFor ...
- PyTorch 常用代码段整理
基础配置 检查 PyTorch 版本 torch.__version__ # PyTorch version torch.version.cuda ...
- JavaScript常用代码段
总结一下在各种地方看到的还有自己使用的一些实用代码 1)区分IE和非IE浏览器 if(!+[1,]){ alert("这是IE浏览器"); } else{ alert(" ...
- C#获取本地IP地址[常用代码段]
获得当前机器的IP代码,假设本地主机为单网卡 string strHostName = Dns.GetHostName(); //得到本机的主机名 IPHostEntry ipEntry = Dns. ...
- Erlang常用代码段
十六进制字符串转为二进制 hex_to_bin(Bin) -> hex2bin(Bin). hex2bin(Bin) when is_binary(Bin) -> hex2bin(bina ...
- php常用代码段
点击换验证码 <a href=" src="{:U('Reglog/vcode')}" /></a> TP上一条下一条 $prev=$artica ...
随机推荐
- 2017-9-17-MDIO信号线串联小电阻作用【转】
今天做集成测试的时候被领导说测到的MDIO信号过冲较大(正反向过冲都很大),容易损坏接口或阻容,万一那个电容耐压值不够就挂了. 我原本是不屑的,私以为MDIO.IIC.SPI等只要抓到的波形不影响判决 ...
- JavaScript基础笔记(一)基本概念
基本概念 一.语法 一)区分大小写 二)标识符 书写规则同Java 三)注释 略 四)严格模式 1.在整个脚本中启用严格模式:在顶部添加 "use strict" 2.指定函数在严 ...
- Redis初步整理
1,Redis 简介 Redis 是完全开源免费的,遵守BSD协议,是一个高性能的key-value数据库. Redis 与其他 key - value 缓存产品有以下三个特点: Redis支持数据的 ...
- select 多选 (EasyUI)
<script type="text/javascript" src="/EasyUI/jquery.min.js"></script> ...
- 在latex或者mathtype中如何输入花体,如拉式量L
这个问题困扰我很久,知道我找到这个答案: 把 \mathcal{L} 直接黏贴到mathtype的编辑框中就可以产生花体L了
- web (Servlet)
1.如果你文档新建的出现很多红色的小擦擦出错 这样做
- .Net core下的配置设置(一)——Configuration
ASP.NET Core 中提供了一个Configuration 包,用以应用配置基于配置提供程序建立的键值对.这里以json文件配置的方式,简单的介绍一下它的用法. 首先定义一个配置文件appset ...
- nat 共享上网软件
http://www.nat32.com/ SinforNat WinGate
- 前端工程化系列[03]-Grunt构建工具的运转机制
在前端工程化系列[02]-Grunt构建工具的基本使用这篇文章中,已经对Grunt做了简单的介绍,此外,我们还知道了该如何来安装Grunt环境,以及使用一些常见的插件了,这篇文章主要介绍Grunt的核 ...
- android面试题总结加强再加强版(一)
在加强版的基础上又再加强的android应用面试题集 有些补充略显臃肿,只为学习 1.activity的生命周期. 方法 描述 可被杀死 下一个 onCreate() 在activity第一次被创建的 ...