随笔分类 -  iOS-UIScrollView及子类

摘要:UITableView中有两种重用Cell的方法: iOS代码 iOS代码 iOS代码 在iOS 6中dequeueReusableCellWithIdentifier:被dequeueReusableCellWithIdentifier:forIndexPath:所取代。如此一来,在表格视图中创建 阅读全文
posted @ 2018-05-29 16:36 俊华的博客 阅读(3842) 评论(0) 推荐(0)
摘要:UICollectionView 瀑布流 添加表头视图的坑 首先是,需求加了个头视图在顶部,在collectionView中的头视图跟TableView的不一样,TableView的表头只要设置tableview.tableHeaderView就可以了. collectionView 怎么添加这样的 阅读全文
posted @ 2017-04-25 16:03 俊华的博客 阅读(15291) 评论(2) 推荐(0)
摘要:一、UIScrollView的属性和代理方法详解 属性: 代理 一、UIScrollView的重要的三大属性contentSize、contentInset、contentOffset 重要说明 (1)UIScrollView的frame与contentsize属性的区分:UIScrollView的 阅读全文
posted @ 2017-04-20 16:53 俊华的博客 阅读(582) 评论(0) 推荐(0)
摘要:问题: stackoverflow上有人提问这样的问题 http://stackoverflow.com/questions/16071503/how-to-tell-when-uitableview-has-completed-reloaddata 如果在调用reloadDate方法后需要立即获取 阅读全文
posted @ 2016-08-26 18:56 俊华的博客 阅读(8008) 评论(1) 推荐(0)
摘要:一、Storyboard中的UIScrollView使用自动布局 在使用storyboard和xib时,我们经常要用到ScrollView,还有自动布局AutoLayout,但是ScrollView和AutoLayout 结合使用,相对来说有点复杂。根据实践,我说一下我的理解,在故事板或xib中,S 阅读全文
posted @ 2016-08-08 17:54 俊华的博客 阅读(2351) 评论(0) 推荐(0)
摘要:UITableView //项目中遇到的 - (void)selectRowAtIndexPath:(nullable NSIndexPath *)indexPath animated:(BOOL)animated scrollPosition:(UITableViewScrollPosition) 阅读全文
posted @ 2016-05-04 14:54 俊华的博客 阅读(1698) 评论(0) 推荐(0)
摘要:一、UITableViewStylePlain 1.有多段时 段头停留(自带效果) 2.没有中间的间距和头部间距(要想有的重写UITableViewCell \UITableViewHeaderFooterView里面的setFrame方法) 扩展:让段头不停留(取消粘性效果) - (void)sc 阅读全文
posted @ 2015-09-25 18:21 俊华的博客 阅读(1767) 评论(0) 推荐(0)