splitViewController in Ipad that doesnt hide in portrait
I want to make an application which has Tab bar. In each TabBar I want to use Two Views that is Table View on left side and Detail View on other side. But the TableView should persist in portrait as well as landscape (same like setting app in iPad).
I have seen some recommendation of using private API that is a risk to use.
[splitViewController setHidesMasterViewInPortrait:NO];开发者_JAVA技巧
and some tutorial like Matt Legend's https://github.com/mattgemmell/MGSplitViewController but I don't need that much customization.
Any Hint or tutorial in right direction would be highly appreciated.
The below tutorial is broken in 4.2 it seems:-
http://blog.blackwhale.at/2010/04/your-first-ipad-split-view-application/
iOS 5 officially supports the following, which I believe is the effect you are trying to achieve:
- (BOOL)splitViewController:(UISplitViewController *)svc shouldHideViewController:(UIViewController *)vc inOrientation:(UIInterfaceOrientation)orientation
{
return NO;
}
Does using [splitviewcontroller setMasterHidesDisplay:NO]
cause Apple to reject the app on the appstore?
Sometime back I tried to achieve a similar thing. After trying Matt's code, and unsucessfully trying to create a category I realized that the only way to do this(in a way that Apple doesn't reject your app) is to use two custom views. Refer this question.
yep.
They rejected my app with this command
([splitviewcontroller setMasterHidesDisplay:NO] )
精彩评论