Custom UISplitViewController for iPad - ios

I want to create a custom UISplitViewController for iPad. It is similar to the Facebook iPad version where there is a viewcontroller and a side table view controller, where the table view is the chat group in facebook NOT the Favorites/Group hidden section.
I want to replicate this:
2x version here: http://i.imgur.com/0WI5yWo.png
I would have a UINavigationViewController that has a navigtionItem left side button, a Title, and a right side searchbar. In it's left viewController it will have a viewcontroller that has a mapview and a tableview underneath it. The right viewcontroller will be a tableViewController. There is also a UISegmentedControl above both these viewcontrollers. Anyone have any ideas on how to go about this? Any help is appreciated. Thanks!
Things I have done:
I have tried using the stock UISplitViewController but I cannot seem to add a UINavigationController to it nor customize it how I want to.
I think my best option is to have a UIViewController that has 2 ContainerViews. The only problem I can see would be that UISegmentedController as well as how I will have 2 tableviews in one file.

Related

Swift: Storyboard solution to clicking from ViewControllers to ViewController in a ContainerView

I am building a App with a fixed Top Bar and some fixed Buttons at the bottom. In the middle of my MainViewController I want to have some Tables I switch in between. The ways I want to do it:
clicking the buttons at the bottom
clicking buttons in my tables
To solve the problem I put a ContainerView inside my MainViewController. It works for me already to switch the InsideViewControllers by clicking one of the buttons at the bottom. I solved it with Apples Tutorial programmatically. By click on a button I change The childViewController of my ContainerView.
When clicking a button in my InsideViewController I am sending a message to my ParentViewController (the Container) right now. This I did by implementing a protocol and checking if my parentViewController implements it.
Now my question is if this is the optimal solution to click from ViewController to ViewController inside my ContainerView. Or is there a better way to click a button on my Table and get the next Table?
What I was thinking about is maybe possible:
A storyboard solution. I want to connect ViewControllers inside my storyboard. So that I have a button on my first view Controller and do a segue from this one to the next ViewController. If I do it just like explained the new ViewController is not filling the Container. There pops up a normal ViewController to my app. Here a example View of this idea:
Is it possible or do I continue by sending messages to my parent?
Sure you can. You can start reading Implementing a Container View Controller, specifically, the section "Configuring a Container in Interface Builder". At the initial phase of adding the Container View, you will automatically see a new UIViewController appearing there. I guess if you will want to perform transitions, you will have to Embed In a navigation controller that new view controller.

How to overlap two screens on button click

I have created two ViewController in objective-c designed on storyboard. But my issue is that, i want to show like that (i have attached screenshot).
Anybody can help me..
You can do this by SWRevealViewController as menu view from https://github.com/John-Lluch/SWRevealViewController
Or take one view on firstViewController

What type of ViewController is this? UITabBarViewController?

I'm making a menu screen for my sports app and decided on doing something like this:
However, I'm not sure how this was created. It kind of works like a UITabBar, but when you click on it, a new viewController appears embedded in a viewController, and the tabBarController at the bottom has disappeared. That leads me to believe it's not a type of UITabBarController. Also, you can scroll through it and there is about 8 different buttons.
Most likely a UICollectionView that pushes other view controllers onto the parent UINavigationController. There's a number of open source examples of this you can find on github.

How to integrate custom view with TabBar?

Well I wish there was some tutorial anywhere or any of the O'Reily Cookbooks would explain this but everyone only ever talks about using UITabBarController.
What I need in my app however is a custom view (basic UIViewController) with a NavigationBar (just for the title bar and a 'Done' button) and a TabBar in it.
The question is: How do I integrate the TabBar and connect views to each bar button (and add more bar buttons)? Can this only be done programmatically or is it possible in Storyboard? And which class needs to be the TabBarDelegate (I suppose my custom UIViewController)?
Does anyone know of a good guide for this or provide me with some hints?
Thanks.
UPDATE:
I decided to simply check in the TabBarDelegate for the tabBar.selectedItem.tag and instantiate a sub view accordingly from the storyboard and add it into a ContainerView that is sandwiched between my nav bar and the tab bar at the bottom. This works so far (although I'm not sure if there's not a better approach) but now I'm facing a different problem:
When a sub view is loaded into the ContainerView the whole tab bar disappears. Does somebody know why this happens?
It is very easy to crate Tab Bar Controller app with Storyboard. Apple even provides a snippet :) When creating a new project, just select iOS -> Application -> Tabbed Application.
Also, here is a pretty good tutorial: https://www.youtube.com/watch?v=RhsHtd6rAiQ.
Solved the original issue myself by creating a Xib with UIViewController in it and place a UITabBar and a UIView as container for subviews. Then load the xib with NSBundle.mainBundle().loadNibNamed() and create Xibs for the sub views that should be loaded and load these with loadNibNamed() and add them with viewContainer.addSubview().

UISplitView in iOS 4.2 with Two Views

I'm trying to create a UISplitView like in facebook iphone by using two UIViews on top of one another (iOS 4.2). I've a UINavigationController and when the user clicks on the leftbar button in the UINavigation controller the Top View should slide away and leave the second view. It works fine but the UINavigationController remains in the same position and I would like to slide it also with the TopView so that there is no UINavigationController on the BottomView. Is this possible? I also referred to similar questions in stackoverflow but couldn't find anything related to this particular problem. Appreciate your suggestions on this regard a lot. Thanks in advance.
Have a look at JTRevealSidebarDemo. That is what exactly what you want.
Please let me know if you anything else than this.

Resources