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 ...
随机推荐
- Java笔记(十四) 并发基础知识
并发基础知识 一.线程的基本概念 线程表示一条单独的执行流,它有自己的程序计数器,有自己的栈. 1.创建线程 1)继承Thread Java中java.lang.Thread这个类表示线程,一个类可以 ...
- Max Factor 2710 最大的合数的质数因子
题目:http://acm.hdu.edu.cn/showproblem.php?pid=2710 思路:用类似“埃氏筛法”求素数的方法 只是不在把合数标记为1 而是标记为他是因子数. 最后比较大小即 ...
- Python3从零开始爬取今日头条的新闻【二、首页热点新闻抓取】
Python3从零开始爬取今日头条的新闻[一.开发环境搭建] Python3从零开始爬取今日头条的新闻[二.首页热点新闻抓取] Python3从零开始爬取今日头条的新闻[三.滚动到底自动加载] Pyt ...
- Java 多线程 并发和并行
并发和并行都可以表示执行多个任务,但是偏重点不同.并发偏重于多个任务交替执行,而多个任务之间有可能是串行的.并行是真正意义上的同时执行. 并发和并行示意图如下: 从严格意义上来说,并行的多个任务是真实 ...
- html概述和html基本结构:
html概述: HTML是Hyper Text Mark-up Language(超文本标记语言)的首字母简写,超文本是指超链接,标记指的是标签,是一种用来制作网页的语言,这种语言由一个个的标签组成, ...
- centos7下安装配置redis
1.1. Redis下载安装(linux) 1.1.1. 下载: 下载地址:https://redis.io/download 选择合适的版本下载,如下图: 1.1.2. 安装: (1)把下载好的re ...
- C# Socket网络编程精华篇 (转)
http://www.cnblogs.com/weilengdeyu/archive/2013/03/08/2949101.html 我们在讲解Socket编程前,先看几个和Socket编程紧密相关的 ...
- Java 调用 shell 脚本详解
这一年的项目中,有大量的场景需要Java 进程调用 Linux的bash shell 脚本实现相关功能. 从之前的项目中拷贝的相关模块和网上的例子来看,有个别的“陷阱”造成调用shell 脚本在某些特 ...
- go test :Wrong test signature
err: Wrong test signature 写测试函数出了个错,找半天才找到原因:虽然很愚蠢,还是记录下. 是因为 参数没加*导致的.
- C#_02.14_基础五_.NET类
C#_02.14_基础五_.NET类 一.类实例: 我们前面说过类是一个模板,我们通过类创建一个又一个的实例,通常情况下类当中的变量是每一个实例都各有一份的,互相不影响,而静态字段是除外的,静态字段是 ...