Setting an image above of a UITableViewController
Iam currently working on a iPad project where i build my code on top of the premade "Split View-based Application". I am t开发者_如何学Gorying to place a image above of the UITableViewController when i rotate my iPad into landscape mode, however i do not know if it is possible without having the image appear in the popover-menu when displaying in portrait mode. I can't place a UIImageView inside IB, so trying to do it from the code.
Here is a image of my table: 1
Create and position the image programaticaly when initializing the view, and implement the following method in the view controller:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations.
imageOverTableview.hidden = !UIInterfaceOrientationIsLandscape(interfaceOrientation);
return YES;
}
精彩评论