mattgemmell / MGSplitViewController

A flexible, advanced split-view controller for iPad developers.
http://mattgemmell.com/
1.52k stars 385 forks source link

Using MGSplitViewController inside UITabBar #39

Open ghulammustafa opened 13 years ago

ghulammustafa commented 13 years ago

I know that MGSplitViewController is not being maintained, but i'm posting this here anyways hoping that someone will stumble upon this and might share his experience and possibly a solution.

My objective is basically to use UISplitViewController inside a UITabBar. UISplitViewController doesn't work well inside a UITabBar. Specifically, UISplitViewController splits apart when device orientation changes. Anyways...

Since UISplitViewController didn't work for me, i turned to MGSplitViewController. And now it seems that it's not a workable solution to be used with UITabBar either. Im running into all sorts of problems. Mainly the following:

I have a tab-bar with 3-4 tabs. Each one contains a MGSplitViewController. In general, the MGSplitViewController contains a Master (UINavigationController) and a Detail (UIViewController). When i rotate the device, the content inside the visible UITableView area is misaligned/disturbed. Scrolling the UITableView to show new cells fixes the misalignment. The Master also has a Navigation bar and a search bar on top of the UITableView, and orientation change doesn't affect them. I'm not getting this issue with UISplitViewController. Any solutions, suggestions, pointers?

Ricardo1980 commented 12 years ago

Same problem here. Did you find a solution?

Here it seems there are some suggestions: http://stackoverflow.com/questions/4089794/uisplitviewcontroller-within-a-uitabbarcontroller-orientation-problem

And here it is my problem: http://stackoverflow.com/questions/8874149/sometimes-willhideviewcontroller-from-uisplitviewcontrollerdelegate-is-not-calle

ghulammustafa commented 12 years ago

I ended up using IntelligentSplitViewController https://github.com/grgcombs/IntelligentSplitViewController. This should solve your problem.

Ricardo1980 commented 12 years ago

You were right. Thanks a lot.