我遇到了一个奇怪的问题,我不知道在哪里/如何解决它......
我在 UIViewController 上有 6 个 UITableViews(我正在使用故事板),我想在 ViewDidLoad 中调整它们的大小,但我不能,我发现调整它们大小的唯一方法是在 ViewDidAppear 中,问题是当我旋转我的模拟器时框架变得像 IB 中一样。
你能帮我处理这个案子吗?
- (void)viewDidLoad
{
[super viewDidLoad];
[_hoursTable setScrollEnabled:NO];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
-(void)viewDidAppear:(BOOL)animated
{
[_firstTable setFrame:CGRectMake(100, 0, 100, 768)];
[_secTable setFrame:CGRectMake(200, 0, 100, 100)];
[_thirdTable setFrame:CGRectMake(300, 0, 100, 100)];
[_fourthTable setFrame:CGRectMake(400, 0, 100, 100)];
[_fifthTable setFrame:CGRectMake(500, 0, 100, 100)];
[_hoursTable setFrame:CGRectMake(600, 0, 100, 100)];
}