我已经设置了的tableView的contentInset的方法- (void)viewDidLoad
和物业然而self.tableView.contentInset = UIEdgeInsetsMake(200, 0, 200, 0);
,tableView.contentInset
将全自动改为:{64, 0, 0, 0}
。为什么发生这种情况,我怎么能解决售后服务这个问题?的UITableView contentInset改变
环境:XCode8.1 iOS10.1
#import "YAVideoViewController.h"
static NSString * const ID = @"cell";
@interface YAVideoViewController()
@end
@implementation YAVideoViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor arcColor];
[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:ID];
self.tableView.contentInset = UIEdgeInsetsMake(200, 0, 200, 0);
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 50;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:ID forIndexPath:indexPath];
cell.textLabel.text = [NSString stringWithFormat:@"第%ld个cell",indexPath.row];
return cell;
}
@end
在ViewController的属性检查器中也可以不选中。 – user2071152