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)写代理方法(中间的留白其实是…
经常遇到要给tableView设置背景图片的问题,但如果直接设置背景  backgroundView的话,背景图不会显示,原因是  tableView上的cell默认是不透明的颜色,所以解决方法是 让  cell透明即可: 1.给tableView设置背景view    UIImageView *backImageView=[[UIImageViewalloc]initWithFrame:self.view.bounds];     [backImageView setImage:[UIImag…
UITableView Scroll to top 手动设置tableview 滚动到 顶部 [mainTableView scrollRectToVisible:CGRectMake(0,0,1,1) animated:YES]; [mainTableView setContentOffset:CGPointZero animated:YES]; 参考:http://stackoverflow.com/questions/724892/uitableview-scroll-to-the-top…
给tableView设置contentInset的时候如果tableView中内容比较多,超过一个屏幕,设置的contentInset是生效的,但是呢,如果页面内容比较少,我们会发现设置contentInset并不会让内容下移,解决办法是在设置contentInset的同时也要设置contentOffset的内容 eg: self.tableView.contentInset = UIEdgeInsetsMake(100, 0, 0, 0); self.tableView.contentOffs…
jQuery获取或设置元素的宽度和高度: 可使用以下3种方法: 1,jQuery width() 和 height() 方法: 2,innerWidth() 和 innerHeight() 方法: 3,outerWidth() 和 outerHeight()方法.   jQuery width() 和 height() 方法,innerWidth() 和 innerHeight() 方法,outerWidth() 和 outerHeight() 方法的区别如下: 一.jQuery width()…
为什么要设置HTML和body的高度? 在一些比较正规的网站经常见到会设置html与body的高度.是为了后面的div高度正确的显示. div的100%是从其上一级div的宽高继承来的,有一点很关键,就是要设置div100%显示,必须设置其上一级div的宽度或高度,否则无效. 前面总得有个容器说明他的高度是多少.这样的话div才能按比例100%继承上一级的高度可惜的是浏览器一般默认解释为内容的高度,而不是100%. 解决方法: 只要为html和body设置高度为100%就可以了html,body…
问题: 设置ListView的Item的高度无效. 解决方式: 设置ListView的Item的minHeight属性.…
Uedior在上传图片的生活,需要自动设置上传图片的宽度或高度属性.该方法只能用于多图上传组件,单图上传无法使用. 该方法基于 ueditor 1.4.3 版本制作: 1.添加属性字段,在config.json文件中: /* 上传图片配置项 */字段下添加: "imageWidth": 700, /* 上传图片宽度指定, 1.4.3官方版本无此参数,自行添加*/ "imageeight": 700, /* 上传图片高度指定, 1.4.3官方版本无此参数,自行添加*/…
  ** *  tableView:editActionsForRowAtIndexPath:     //设置滑动删除时显示多个按钮 *  UITableViewRowAction                        //通过此类创建按钮 *  1. 我们在使用一些应用的时候,在滑动一些联系人的某一行的时候,会出现删除.置顶.更多等等的按钮,在iOS8之前,我们都需要自己去实现.但是,到了iOS8,系统已经写好了,只需要一个代理方法和一个类就搞定了 *  2. iOS8的协议多了一个…
看到这篇文章说明你已经从老版本升级到 Ubuntu 16.04 或进行了全新安装,在安装好 Ubuntu 16.04 LTS 之后建议大家先做如下 15 件事.无论你是刚加入 Ubuntu 行列的新用户,还是有经验的老用户,你都会发现一些非常有用的调整和建议. Ubuntu 16.04 LTS正式发布下载,长达5年技术支持  http://www.linuxidc.com/Linux/2016-04/130508.htm Ubuntu 16.04 U盘安装图文教程 http://www.linu…
效果: 这里的数据模型有两层:每一组汽车是一层模型,每一组里面的每一行汽车品牌也是一层模型. (1)我们先创建一个WSCars模型. 在WSCars.h中: #import <Foundation/Foundation.h> @interface WSCars : NSObject @property(nonatomic,copy) NSString *icon; @property(nonatomic,copy) NSString *name; +(WSCars *)carsWithDict…
在ViewDidLoad里面设置了 self.tableView.tableHeaderView = 自定义的View 然后在模拟器上运行后,发现这个HeaderView挡住了后面的Cell,也就是cell的第0行不是接在HeaderView的下面 解决方法: 另外再用代码创建一个view1,将处定义的view添加到这个view1上,然后再self.tableView.tableHeaderView = view1…
1.隐藏尾部或者头部,配套使用 //注册头部id tv.register(JYWithdrawalRecordSectionView.self, forHeaderFooterViewReuseIdentifier: sectionHeaderID) //设置高度:注意此处写死的. 如果用VFL 或者自适应,没效果的 tv.sectionHeaderHeight = 60//但是这里不好获取 //用下面方法 tv.sectionHeaderHeight = JYWithdrawalRecordS…
[self.tableView setTableHeaderView:view]; [self.tableView setTableFooterView:view];…
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.ios10 tableview头部空白 if (@available(iOS 11.0, *)) { self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; }else { self.automaticallyAdjustsScrollViewInsets = NO; } https://www.jianshu.com/p/7eea417275af 2. 如果没有使用po…
1.NSInvocation存储 -(void)setInvok:(id)target sel:(SEL)sel key:(id)key { if(!target) return; NSMethodSignature *sig=[target methodSignatureForSelector:sel]; NSInvocation *invo=[NSInvocation invocationWithMethodSignature:sig]; [invo setTarget:target]; […
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…
1.ImagePickerSheetController open class ImagePickerSheetController: UIViewController, UITableViewDataSource, UITableViewDelegate, UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout, UIViewControllerTransitioningD…
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…
1.终端输入sudo passwd 2.输入当前用户密码,回车 3.按照终端提示输入新的root密码并确认 4.su root 输入新的密码 5.修改root密码成功…
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…
ESC 退出 0 进度条开关 1 屏幕原始大小 2 屏幕1/2大小 3 屏幕1/3大小 4 屏幕1/4大小 5 屏幕横向放大 20 像素 6 屏幕横向缩小 20 像素 S 下一帧 [ -2秒 ] +2秒 ; -1秒 ' +1秒 下一个帧 -> -5秒 ffmpeg-20170110-bin.tar.xz ffmpeg-20170116-bin.tar.xz ffmpeg-20170121-bin.tar.xz ffmpeg-20170123-bin.tar.xz ffplay 修改很多 ffmp…
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. 94  brew install  mongodb 95  cd ~ 96  cd Desktop/web/ 97  ls 98  mkdir mongo 99  cd mongo/ 100  ls 101  mkdir -p data/db 102  chown `id -u` data/db 103  ls data/db 107  mongod 109  mongod --dbpath data/db http://blog.csdn.net/moumaobuchiyu/articl…
1. pip install virtualenv virtualenv testvir cd testvir cd Scripts activate pip https://zhuanlan.zhihu.com/p/32286726 2.ipython python sudo pip install ipython brew install python python which python sudo pip install ipython ipython ipythonwhich ipyt…
1. 运行脚本时出现了这样一个错误,打开之后并没有找到所谓的^M,查了之后才知道原来是文件格式的问题,也就是linux和windows之间的不完全兼容...具体细节不管,如果验证: vim test.sh:set ff?如果出现fileforma=dos那么就基本可以确定是这个问题了.:set fileformat=unix:wq OK了....... http://blog.csdn.net/yongan1006/article/details/8142527…
1. find . -type f -exec echo {} \; find src -type f -exec sh -c "iconv -f GB18030 -t UTF8 {} > {}.txt" \; find src -name "*.cpp.txt" | awk -F '.txt' '{print "mv "$0 " "$1}' | sh find include -type f -exec sh -c &…