// cell默认分隔线左边有间距,把left设为0就没了 tbv.separatorInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) // 设置cell分隔线颜色 tbv.separatorColor = UIColor.red ...
分类:
其他好文 时间:
2017-03-24 17:39:10
阅读次数:
148
解决方法如下: if (scrollView.contentOffset.y >= 0 && scrollView.contentOffset.y <= pushNewsTableViewHeaderViewHeight) { scrollView.contentInset = UIEdgeInse ...
分类:
移动开发 时间:
2017-03-23 22:09:19
阅读次数:
1689
在UITableView获取高度的代理方法中,经常需要根据实际的模型重新计算每个Cell的高度。直接的做法是在该代理方法中,直接根据模型来返回行高;另 [1]-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(N ...
分类:
其他好文 时间:
2017-03-20 21:06:10
阅读次数:
221
http://www.tuicool.com/articles/JbiMvum 在上一篇文章中 我们讲了通过整合tableview的代理,来达到代码复用,减少控制器代码量的效果,今天我们接着来讲另外的一些方法来减轻控制器代码量,整合封装,提高代码的可读性。 UITableViewController ...
分类:
其他好文 时间:
2017-03-17 18:57:32
阅读次数:
236
// 实现tableView单选 import UIKit class ViewController: UIViewController { var tableView: UITableView! override func viewDidLoad() { super.viewDidLoad() t ...
分类:
编程语言 时间:
2017-03-17 14:41:37
阅读次数:
264
正常继承自UIView新建的view是不包含xib的自己新建的 xib 关联 view 以后,在 xib 上拖拽 tableView等包含有 delegate 的控件时,当和UIViewController一样直接拖拽代理的时候会出现-[ViewController numberOfComponen ...
分类:
其他好文 时间:
2017-03-14 17:23:15
阅读次数:
218
iOS8之后苹果推出的一个新特性Self Sizing Cells,意思就是让cell自己计算自己的高度,当我们在cell里面添加完所需控件,并约束好位置之后,我们只需要设置 tableView.estimatedRowHeight = 44.0f;//推测高度,必须有,可以随便写多少 tableV ...
分类:
其他好文 时间:
2017-03-14 11:59:36
阅读次数:
146
package application; import java.net.URL; import java.util.ResourceBundle; import javafx.collections.FXCollections; import javafx.collections.Observab... ...
分类:
编程语言 时间:
2017-03-12 16:31:53
阅读次数:
369
The QAbstractItemModel class provides the abstract interface for item model classes. ps:QAbstractItemModel类为项目模型类提供了抽象接口。 Detailed Description 详细说明 Th ...
分类:
其他好文 时间:
2017-03-10 20:39:29
阅读次数:
364
今天看了一些博客文章分享了如何给ViewController 瘦身的问题, 其中一个就是tableView. 的确,随着产品迭代,VC里面可能越来越臃肿,有时候真的需要好好进行一次瘦身.可能是参考的博客中讲解更侧重于方法的复用,其实这个真的是很灵活的问题,有时候tableView list 都是同一 ...
分类:
移动开发 时间:
2017-03-10 16:36:46
阅读次数:
231