iOS 8的scrollView上的试图都不显示(scrollView直接加在带navigation的self.view上
2015-06-26 11:03
323 查看
iOS下,如果我们的self.view 的第一个子试图直接就是scrollView的话,那么ScrollVIew的所有子试图都会下移64个像素。
self.automaticallyAdjustsScrollViewInsets =
NO;
self.headerScrollView = [[UIScrollView
alloc] initWithFrame:CGRectMake(0,
64,
self.view.frame.size.width,
30)];
_headerScrollView.contentSize =
CGSizeMake(offX, 0);
self.headerScrollView.bounces =
NO;
self.headerScrollView.showsHorizontalScrollIndicator
= NO;
self.headerScrollView.showsVerticalScrollIndicator
= NO;
[self.headerScrollView
addSubview:_headerView];
[self.view
addSubview:self.headerScrollView];
self.automaticallyAdjustsScrollViewInsets =
NO;
self.headerScrollView = [[UIScrollView
alloc] initWithFrame:CGRectMake(0,
64,
self.view.frame.size.width,
30)];
_headerScrollView.contentSize =
CGSizeMake(offX, 0);
self.headerScrollView.bounces =
NO;
self.headerScrollView.showsHorizontalScrollIndicator
= NO;
self.headerScrollView.showsVerticalScrollIndicator
= NO;
[self.headerScrollView
addSubview:_headerView];
[self.view
addSubview:self.headerScrollView];
相关文章推荐
- 网易新闻iOS版使用的18个开源组件
- ios 开发记录 点点滴滴
- 【iOS】国际化(对一些有用资源的汇总)
- IOS init initWith 等相关集中
- iOS 加载图片选择imageNamed 方法还是 imageWithContentsOfFile?
- iOS Base64编解码
- 三种方式使得iOS应用能够在后台进行数据更新和下载
- IOS 四种保存数据的方式
- Model-View-ViewModel for iOS [译]
- 为什么很多 iOS 软件的启动页需要等好几秒?
- 说说iOS与内存管理(上)
- ios委托使用原则
- 那些在学习iOS开发前就应该知道的事(part 1)
- iOS strong 和weak的形象理解(真的很精典!)
- 那些在学习iOS开发前就应该知道的事(part 2)
- IOS学习笔记30—两个ViewController间传值(一)
- IOS 多线程GCD的使用[转载于新浪微博, 原作者:太阳石]
- iOS8 storyboard中Use A…
- [2014-04-20]ios获取数据中去掉htm…
- iOS 开发者必知的 75&nb…