我有一个IPad应用程序,在另一个视图中有一个小UITableView,但是当我添加足够的单元格时,ScrollView不会增长,为什么?
@edit:我的意思是我无法滚动,因为它会反弹回顶部。
这是tableview的framechange的代码:
- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
duration:(NSTimeInterval)duration {
[super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft
|| toInterfaceOrientation == UIInterfaceOrientationLandscapeRight){
CGRect rect = _table.frame;
rect.size.height = 565;
_table.frame = rect;
//_table.contentSize = CGSizeMake(_table.contentSize.width, 1000); // Doesn't work
}else{
CGRect rect = _table.frame;
rect.size.height = 820;
_table.frame = rect;
_table.contentSize = rect.size;
//_table.contentSize = CGSizeMake(_table.contentSize.width, 1000); // Doesn't work
}}