MGSplitViewController using Storyboards - iphone

I have been working on this for some time now and just cant quite get it to work... Has anyone implemented a MGSplitViewController app using storyboards in iOS 5? I just cant get anything to show up like in the example project and was wondering if there were any tutorials or just steps to getting this to work...
Thanks

iOS 5 allows you to custom create View Controller containers.
Refer to "Implementing UIViewController Containment". They have a sample project demo, but not sure if they have published the source code.
I think you can create a root ViewController that holds two more child ViewControllers
Child 1 - Has UITableView and is aligned left.
Child 2 - Has UIView for the details on the right.
MGSplitViewController style transition could be achieved through transitionFromViewController:toViewController:

Related

Iphone dev - Multiview app with storyboard

I have seen some tutorials about iphone development, but they're before ARC and before storyboard it seems.
The guy creates a switch that will switch between two views.
A class with a blue background, and a class with a red background.
How would you do this in IOS5 with storyboard?
I've heard about segues, but they get a 'back' button, which the guy in the tutorial didnt get - he simply changed between views my tapping the switch/button.
You better go through this tutorials to understand how to develop app in IOS 5. The tutorials, which you have already seen are for ios4 and prior to it. Also you can use those in IOS 5 too. But Storyboard is much easier than XIB.
http://www.techotopia.com/index.php/IPhone_iOS_5_Development_Essentials
http://www.techotopia.com/index.php/Using_Xcode_Storyboarding_%28iPhone_iOS_5%29
Anyway #dew given you the correct answer.
You need to add 2 View Controllers into your storyboard and then embed in navigation controller. After you create some button in one view, you just gotta ctrl-drag it to the other view and select push, that should do it. Or simply chech out this tutorial http://maybelost.com/2011/10/tutorial-storyboard-in-xcode-4-2-with-navigation-controller-and-tabbar-controller-part1/ :)
I would highly suggest watching the first 2 or 3 lectures of Stanford's CS193P introductory iPhone programming course. It's free and will start you off on the right foot. It's also targeted for iOS5 and Xcode 4. Check it out at:
http://itunes.apple.com/itunes-u/ipad-iphone-application-development/id473757255
To answer your question, moving between view controllers is usually done using a container controller or pushing view controllers 'modally'. I would suggest reading the View Controller Programming Guide put out by apple for an overview of how these things work.
In iOS5 you can use storyboards to set-up segues (as you suggested). They don't always 'give you a back' button, only when you segue between view controllers within a navigation controller. You can have a button push a view controller onto a screen by setting up target-action.
Again, the iTunesU lectures will cover all this. Check it out!

How do I get a ViewController for a extra view integrated into the projects main View?

How do I get a ViewController for a extra view integrated into the projects main View?
I want 1 extra UIView in my apps main UIWindow.
How do I get a viewController for the extra UIView?
I want to execute code to it.
Thanks!
I know Im asking alot of similar questions, but im trying different ways of approaching a design.
Thanks!
Use ModalViewControllers, TabBarViewController, UINavigationController.
Definitely study the View Controller Programming Guide and View Programming Guide. These two guides will tell you how to present different screens and when to use View Controllers and Views.

Creating custom menu at top like Real Simple Recipes does

I want to create tabbar controller placed at the top like Real Simple Recipes in iPad has done. I suspect that it is not UITabBarController as I have tried so many ways to place tab bar on the top by setting its view frame as
self.tabBarController.tabBar.view.frame = CGRectMake (0,0,768,self.tabBarController.tabBar.view.frame.height);
But it is not working.
Is it custom tabbar controller created or it is managed manually ? Any sample code or direction would be appriciated.
You want to make a custom view switcher of your own. This blog post has a nice tutorial for doing so. It uses a segmented control to do the switching, but you could adapt it to use a row of buttons if you needed a custom look.
(If you are OK requiring iOS 5, this gets easier with the view controller containment APIs, and it'd be a completely different implementation to the one suggested in that article.)

How-to incorporate a UISegmentedControl inside a UITabBarController?

I used the following tutorial Red Artisan to create a UISegmentedControl which I use to switch between two views: a simple one and a table view.
Everything is fine when I create a new standalone project, but what I really want is to incorporate this functionality in another project with a UITabBarController as the rootController (the segmented control with two views will be inside the second tab).
In the above tutorial the segmented control, navigation and segment controllers are instantiated and configured from within the application delegate.
Any idea how this could be done from a lower level?
Thank you in advance!
Basically, you need to create a UITTabBarController based application (There are LOTs of tutorials on how to do this), and then in the second UIViewController (or a custom subclass), you would create your UISegmentedControl to switch between two pages.
It sounds like you might also be using a UINavigationController as your base controller in the first application, if this is so..you could have a UITabBarController that has two Controllers in it (two tabs), and the second one will be a UINavigationController like how you had it setup in the app delegate.
Also, there are tutorials to do basically this exact thing all over the internet. Try searching for " UINavigationController inside UITabBarController " or similar. One other thing, there is an example of how the "layering" works in the Apple UI documentation for having a UINavigationController be one of the tabs of a UITabBarController (This is a quite common approach for iPhone apps)
Good luck!

UISplitViewController with three controller

I am working with developing an iPad application. In that i have to display two table views and one web view in a single view. UISplitViewController allows to add two controller only. Please any one help me.
UISplitViewController cannot be configured to use more than 2 sections. If you want to have this functionality in a view controller, you have to write your own. Matt Gemmell's open-source MGSplitViewController might be a good place to start your coding.
Of course, you can also just add the three views as subviews to a plain UIViewController subclass.