I want to add an UIImageView
on the top of the UITableView
generated in the MoreNavigationController. To do this I need to change the UITableView
's position and size.
Here is the code I tried:
UIImageView *img = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"barre.png"]];
[img setFrame:CGRectMake(0, 20, 320, img.frame.size.height)];
[self.tabBarController.moreNavigationController.view addSubview:img];
[[[self.tabBarController.moreNavigationController.viewControllers objectAtIndex:0] view] setFrame:CGRectMake(0, 320, 320, 300)];
The image is added but the tableview size and position don't change. I also tried:
[self.tabBarController.moreNavigationController.topViewController.view setFrame:CGRectMake(0, 320, 320, 300)];