iOS UITableviewWrapperView 和 automaticallyAdjustsScrollViewInsets属性
|
A Boolean value that indicates whether the view controller should automatically adjust its scroll view insets. |
|
|
The default value of this property is YES, which allows the view controller to adjust its scroll view insets in response to the screen areas consumed by the status bar, navigation bar, and toolbar or tab bar. Set to NO if you want to manage scroll view inset adjustments yourself, such as when there is more than one scroll view in the view hierarchy. |
|
这是指示ViewController是否自动调整subview中的scrollView位置的布尔变量。
此属性的默认值是YES,它使得视图控制器来调节响应的状态栏,导航栏占用的屏幕区域的scrollview,和toolbar或tabBar。,如果你要自己管理插入调整scrollView就设置为NO。
[[[UIDevice currentDevice] systemVersion] floatValue]
UITableView *tableView;
float Version=[[[UIDevice currentDevice] systemVersion] floatValue];
if(Version>=7.0)
{
tableView = (UITableView *)self.superview.superview;
}
else
{
tableView=(UITableView *)self.superview;
}
NSIndexPath *indexPath= [tableView indexPathForCell:self];
indexPath = [NSIndexPath indexPathForRow:kImage1IndexinSection:indexPath.row];
但是今天所做的项目里用到了tabbarController中一个VC的childVC中使用tableView时候,在切换tabbar的VC时,ChildVC的table会掉64(navigationBar的高度),设置automaticallyAdjustsScrollViewInsets 也无效,
所以只好拿到UITableviewWrapperView强行设置frame:
for (UIView *subview in tableView.subviews)
{
if ([NSStringFromClass([subview class]) isEqualToString:@"UITableViewWrapperView"])
{
subview.frame = CGRectMake(, , tableView.bounds.size.width, tableView.bounds.size.height);
}
}
应该是automaticallyAdjustsScrollViewInsets的问题,以后研究
iOS UITableviewWrapperView 和 automaticallyAdjustsScrollViewInsets属性的更多相关文章
- iOS开发-automaticallyAdjustsScrollViewInsets属性
iOS开发-automaticallyAdjustsScrollViewInsets属性 Available in iOS 7.0 and later. 简单点说就是automaticallyAdju ...
- iOS数据存储之属性列表理解
iOS数据存储之属性列表理解 数据存储简介 数据存储,即数据持久化,是指以何种方式保存应用程序的数据. 我的理解是,开发了一款应用之后,应用在内存中运行时会产生很多数据,这些数据在程序运行时和程序一起 ...
- 关于tableView的那些坑(一)—— automaticallyAdjustsScrollViewInsets属性
最近用tabbar来切换控制器,用childViewController来实现多控制器管理,多列表切换,在子控制器中设置了automaticallyAdjustsScrollViewInsets属性为 ...
- Pop–实现任意iOS对象的任意属性的动态变化
简介 Pop 是一个可扩展的动画引擎,可用于实现任意iOS对象的任意属性的动态变化,支持一般动画,弹性动画和渐变动画三种类型. 项目主页: pop 最新示例: 点击下载 注意: 官方代码中,并不包含实 ...
- iOS edgesForExtendedLayout、extendedLayoutIncludesOpaqueBars、automaticallyAdjustsScrollViewInsets属性详解
edgesForExtendedLayout: 在IOS7以后 ViewController 开始使用全屏布局的,而且是默认的行为通常涉及到布局,就离不开这个属性 edgesForExtendedLa ...
- 【转】iOS学习之translucent属性
原文地址:http://www.jianshu.com/p/930643270455 总所周知,苹果从iOS7开始采用扁平化的界面风格,颠覆了果粉们"迷恋"的拟物化风格.对于开发者 ...
- [IOS]edgesForExtendedLayout、automaticallyAdjustsScrollViewInsets
在IOS7以后 ViewController 开始使用全屏布局的,而且是默认的行为通常涉及到布局 就离不开这个属性 edgesForExtendedLayout,它是一个类型为UIExtendedEd ...
- edgesForExtendedLayout、extendedLayoutIncludesOpaqueBars、automaticallyAdjustsScrollViewInsets属性详解 )——转载
edgesForExtendedLayout: 在ios7适配中,布局问题是一个很头痛也很重要的问题,因为在ios7中viewController使用了全屏布局的方式,也就是说导航栏和状态栏都是不占实 ...
- iOS开发之--UITextField属性
UITextField属性 0. enablesReturnKeyAutomatically 默认为No,如果设置为Yes,文本框中没有输入任何字符的话,右下角的返回按钮是disabled的. ...
随机推荐
- Windows 8/8.1系统下硬盘占用率100%的问题解决思路汇总
家庭组 2.关闭虚拟内存 3.关闭Windows 8快速开机功能 4.服务进程superfetch 5.系统下软件排除 操作步骤: 1.Windows 8系统的家庭组方便多人不用存储设备就能在局域网中 ...
- 前端模块化开发篇之grunt&webpack篇
几个月前写了一篇有关gulp和browserify来做前端构建的博客,因为browserify用来做js的打包时可能有些麻烦(特别是在写React的时候),所以这里再强烈推荐一款js打包工具-webp ...
- ARM学习笔记6——程序状态寄存器访问指令
这两条指令结合,可用于对CPSR或SPSR进行读/写操作. 当需要保存或修改当前模式下CPSR或SPSR的内容时,首先必须将这些内容传递到通用寄存器中 1.MRS指令(Move to Register ...
- JSP九大内置对象详解
内置对象特点: 1. 由JSP规范提供,不用编写者实例化. 2. 通过Web容器实现和管理 3. 所有JSP页面均可使用 4. ...
- makefile 进阶
一步一步写一个简单通用的makefile(一) 一步一步写一个简单通用的makefile(二) 一步一步写一个简单通用的makefile(三) 一步一步写一个简单通用的makefile(四)
- 问题-[Delphi]SendMessageTimeout调用后卡住点击任务栏还会出现窗体处理
问题现象:在使用SendMessageTimeout函数后,5秒后WIN把进程挂在起.这时把程序最小化(原因就是不想让用户看到卡的界面),但点击任务栏按钮界面还原了,拦截消息失败(原因是挂起后消息都放 ...
- tomcat多域名配置
1.找到你的tomcat然后在conf文件中找到server.xml打开: <Server port="8005" shutdown="SHUTDOWN" ...
- Spring-接口调用
在Spring框架下实现和调用接口时,不用再代码中创建接口对象.而是依赖容器注入接口的实现对象. 1.创建接口 package service; /** * Created by xumao on 2 ...
- 之前学习wordpress的几张图片
- Contact Form 7邮件发送失败的解决办法
一.contact form 7无法发送邮件的原因 对mail()函数的不支持. Contact Form 7表单提交失败在使用过程中会出现,归根结底原因在于wordpress主机问题,由于国 内很多 ...