1. [tableView reloadData]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ /*contentsize没有更新*/ }); iOS11默认开启Self-Sizing,关闭Self-Sizing即可.self.tableView.estimatedRowHeight = 0; self.tableVie…
在 iTouch4 或者相差不多的 iPhone 上,不建议在 UIViewController 的 viewWillAppear 的方法中放置 UITableView 的 reloadData 方法,尤其 Cell 定制的较为复杂且含有图片的时候.为每个 Cell 加载内容在这些内存并不是很够的机器上运行相当吃力,严重点会感觉卡了十几秒,尤其现在仍然在使用的这些设备都有了些年头,性能上多少不足. 对于 [UITableView reloadData] 的调用,也应该在必要的时候执行,频繁的执行…
1. 正确的处理方法 1)设置标头的高度为特小值 (不能为零 为零的话苹果会取默认值就无法消除头部间距了) UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 0.001)]; view.backgroundColor = [UIColor redColor]; self.tableView.tableHeaderView = view; 2)写代理方法(中间的留白其实是…
1.blockskit https://github.com/zwaldowski/BlocksKit bk_showAlertViewWithTitle 2.toast +(void)showToast:(NSString *)title inView:(UIView *)view{ MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:view animated:YES]; hud.mode = MBProgressHUDModeText; h…
记住: ★当std::swap对你的类型效率不高时,提供一个swap成员函数,并确定其不抛出异常 ★若你提供一个member swap,也该提供一个non-member swap来调用前者.对于classes(而非templates),也请特化std::swap ★调用swap时应针对std::swap使用using声明式,然后调用swap并且不带任何“命名空间资格修饰” ★为“用户定义类型”进行std templates全特化是好的,但千万不要尝试在std内加入某些对std而言全新的东西 --…
1.xcode debug 了解了每个设置的意思,个人觉得对于一个普通的app来说可以这样配置这些设置: Generate Debug Symbols:DEBUG和RELEASE下均设为YES(和Xcode默认一致): Debug Information Level:DEBUG和RELEASE下均设为Compiler default(和Xcode默认一致): Deployment Postprocessing:DEBUG下设为NO,RELEASE下设为YES,这样RELEASE模式下就可以去除符…
1.clang -rewrite-objc main.m #import <objc/runtime.h> #import<objc/message.h> #import <Foundation/Foundation.h> @interface Person : NSObject //为了方便查看重写的代码将name改成cjmName @property (nonatomic, copy) NSString *cjmName; @property (nonatomic,…
1.ubuntu ============== sudo apt-get install openjdk-8-jdk https://blog.csdn.net/zhaohaiyitian88/article/details/78885745 ===================== brew install tomcat brew search tomcat brew install tomcat catalina -h #查看帮助 catalina run #运行服务 https://ww…
1. 用 SVN 即可. 举例说明: 譬如这个项目: Mooophy/Cpp-Primer · GitHub, 我只想看 ch03 文件夹的代码怎么办? 先打开 ch03, 其 URL 为: "https: //github. com/Mooophy/Cpp-Primer/tree/master/ch03"(这里添加空格, 为了防止知乎智能识别) 将 /tree/master/ 换成 /trunk/ . (这个以前玩 Google Code 的人应该很熟悉.) "https:…
1. - (void)collectionView:(UICollectionView *)collectionView willDisplaySupplementaryView:(UICollectionReusableView *)view forElementKind:(NSString *)elementKind atIndexPath:(NSIndexPath *)indexPath { view.layer.zPosition = 0.0; } https://stackoverfl…