您的位置:首页 > 产品设计 > UI/UE

iOS UITableView多出一部分空白

2016-09-08 09:03 323 查看
问题出现的原因:创建tableView时使用的style是UITableViewStylePlain

解决办法:

在创建tableView时,self.automaticallyAdjustsScrollViewInsets = NO;

官方文档是这么写的:

@property(nonatomic, assign) BOOL automaticallyAdjustsScrollViewInsets


 
Discussion
Default value 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.

 

 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: