How to create two sections of the same screen using a custom view controller - iphone-sdk-3.0

I was wondering if someone could tell me how to create a custom view controller which will split the screen into two sections and manage the sections seperately in the same manner that the iPad Zillow app does this?
See http://www.zillow.com/ipad/ if you are unfamiliar with the app.
Thanks.

Use a UISplitViewController.

If you want a split view controller that works like the one in that app then you will have to write your own, UISplitViewController doesn't really have any settings that can be customized.

Related

Alternative to UISplitViewController without need for it to be rootViewController

I was wondering, I need some simple feature like a UISplitViewController where i have a master-detail navigation. I can't use a UISplitViewController as it requires to be associated as root view controller. I need to have this called modally within a View.
is there any similar alternative controller to implement this?
Thanks guys
Take a look at MGSplitViewController. Really good, offers similar API.

Can a splitview be loaded inside the detail view of another splitview?

I am trying to develop an application that has screen flow similar to oracle app. I have attached the images here. Can anyone please tell how this can be achieved ?
Thanks in advance.
What you are looking for is a custom Split View Controller. The screenshots you provided are of custom split view controllers. The UIKit has UISplitViewController but this must be a fullscreen view controller.
To make a custom split view controller there's the old way, by having a main view controller and making your two master and detail controllers, adding their view to the main view controllers view.
You need to forward on calls from viewWillAppear:, viewWillDisappear: etc from the main view controller to the two controllers that you manage.
As of iOS 5, you can do something similar with view controller containment, this has a few more bells and whistles, more interesting it handles rotation animations better and all the call forwarding to the children controllers that you had to do manually in the first solution.
Check out this link for more details on custom split view controllers:
http://www.mindtreatstudios.com/how-its-made/custom-uisplitviewcontroller-ios/
To answer your question directly: if you make a custom split view controller - yes you can add this as a detail view controller. But watch out, this isn't a UISplitViewController, so just be careful not to use that term so much.
Haven't really tested this, but doesn't this solve your problem?
Create a storyboard file
Drop in a SplitViewController
Delete the DetailViewController
Drop in another SplitViewController
Link the two together using CTRL-drag and select Detail
Set the size of the detail-splitviewcontroller to Detail
????
Profit!
Anyways, not sure if it really works, but give it a try. This is IOS5 though (I think, might try it out with IB).
It'll look something like this:
If you're going to have to write your own class, you might want to first look at https://github.com/mattgemmell/MGSplitViewController for inspiration.

Create a template mechanism in Objective-C for iPad applications

I'm looking for a solution to create a sort of template in Objective C. I'll try to explain my problem.
I would create a sort of main view which has 1 side bar that remain always visible. This side bar have controls. The main view is responsible to load a Navigation Controller (UINavigationController seems to be ok) that manages other views. When switching a view to another, the sidebar always remain visible under the Navigation Controller and its views.
Through the controls of the sidebar, it's possible to send event to a specific view loaded by the Navigation Controller.
Any idea to create a similar template?
Thank you. Best regards.
It sounds like you want a splitview which is implemented by UISplitViewController.

Best way to orchestrate multiple views in iOS without UITabBar or UINavigationBar?

I'm trying to create an iPhone app with a welcome screen that leads to two or three pretty disparate UIs; once you've drilled into one you're not going to have much use for the others, and each one is itself fairly complicated.
The designers are all web types and it looks like the "navigation" paradigm is the closest to what they want, but the breadcrumb-style navigation bar isn't.
If I set up a UINavigationController, can I then drive it with arbitrary buttons in the views?
And in general, is it possible to swap out the contents of a view programmatically?
And if so, what do I need to watch out for? (E.g., in Java if you change the contents of a JPanel you need to make sure it gets revalidated and repainted.)
Total iOS newbie here, coming from the Java world, super-explicit advice much appreciated. Using Monotouch, but happy to take Obj-C help and translate. :)
It's hard to tell you how to design your app with only that information, so I'll assume you want to do a drill-down thing like a UINavigation controller.
1- Yes, you can drive the UINavigationController from other ViewControllers, using methods like PushViewController() and PopViewController(). You can also hide the toolbar or some of the toolbar buttons if you want. You can find some great examples here.
2- Yes, you can change contents of a view. Views contains other views and you can add and remove them as you want.
3- The main thing to be careful about is to make sure that calls that update the view are done inside a InvokeOnMainThread(()=>{}) call. More info here.

Best Design Practices if there are more than one views in an Application

Hey champs,
This question is for iPad apps designing.
I searched a lot on this very useful site but i didn't find anything related to the question.
Suppose my application needs to present multiple views to the user, then what is the best way to do that. The ways i think that are possible are
1) Use only one view controller and add all other things as a view.
2) Push all the view controllers on the same viewController.
but if we follow 2nd way, we can not get the desired response to orientation changes.
I am a noob so please spare me on this. Any help will be greatly appreciated.
In our iPad game we are using UIKit therefore we have different views displayed at once. We are using view controllers for most of the views which were then pushed on one specific view to show them.
This keeps the logic code separated in the view controller.
The interaction between the controllers (for example hiding or showing a view after an event) will be done with notifications (NSNotificationCenter) to prevent too much dependencies.