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 ...
随机推荐
- python系统编程(十二)
异步 同步调用就是你 喊 你朋友吃饭 ,你朋友在忙 ,你就一直在那等,等你朋友忙完了 ,你们一起去 异步调用就是你 喊 你朋友吃饭 ,你朋友说知道了 ,待会忙完去找你 ,你就去做别的了. from m ...
- 安装django及配置
安装 diango官网下载地址 https://www.djangoproject.com/download/ 安装最新的LTS版本 pip安装(在windows的crm中或pycharm中的Term ...
- 使用itchat实现一个微信机器人聊天回复功能
近看到好多群里都有一个@机器人的功能,挺有趣的,想自己也玩下,就通过百度一点点实现,在这总结一下整个从无到有的过程. 首先,要知道itchat,它是Python写的,所以想要实现这个机器人的功能,需要 ...
- 11-14 dom
1.DOM document object model (1) 节点树状图:Document>documentElement>body>tagname 2.我们常用的节点类型 元素节 ...
- 用css实现自定义虚线边框
开发产品功能的时候ui往往会给出虚线边框的效果图,于是乎,我们往往第一时间想到的是用css里的border,可是border里一般就提供两种效果,dashed或者dotted,ui这时就不满意了,说虚 ...
- arcgis 获得工具箱工具的个数
import arcgisscripting import string; gp = arcgisscripting.create(9.3); ##多少个工具箱 toolboxes = gp.list ...
- Mac下不用重复输入ssh-key的密码
重装系统,复用以前的SSH key,发现每次调用这个Key都要输入Key的密码,很繁琐,以前不是这样的哦. 更新代码.SSH服务器总是提示: Enter passphrase for .../id_r ...
- js-将一个对象转换成一个新的对象
/** * 对象转换成一个新的对象 * @param object * @private */ function _yh_tranformObject(object){ if(object == nu ...
- 重新认识 Delphi
一.彩蛋 1.打开 Delphi,选择"Help" –> "About-"菜单,出现 About 对话框. 2.在 About 窗口上按住 Alt 键盘, ...
- 自己定义ViewGroup实现仿淘宝的商品详情页
近期公司在新版本号上有一个须要. 要在首页加入一个滑动效果, 详细就是仿照X宝的商品详情页, 拉到页面底部时有一个粘滞效果, 例如以下图 X东的商品详情页,假设用户继续向上拉的话就进入商品图文描写叙述 ...