Master/Detail Application : Add a second Split View Controller to the Detail View - xcode4.3

I have a MAster/Detail Application and everything is fine. Now when loaded, we have the Button Named "Master" That will slide over the original Master View Controller. I want to change it's behavior ,so instead of popping over the original MasterViewController..i need it to popOver another SplitViewController with the option of going back to the original one. Any ideas how to create this? I dunno where to start. Any ideas will be highly appreciated
Please Check This Edit
Edit 1 :
To be more precise...i have a dictionary application that first loads all the elements in the master view controller on the left...once i click on any element, it will open up in details view controller as it should.
Once in the Details view controller..if i click on Add to Favorites button...and click on the button Show Favorites...i need it to show me in the MasterViewControlle all the selected favorites instead of all the dictionary elements...how can i do it?

Seeing your question i feel you want to have UISplitViewController like below.
I never worked on it but try out this tutorial and try to integrate this feature in your project.
Raywenderlich tutorial link Click here
UISplitViewController class reference Click here

check this Question already asked in stackoverflow if you want to use protocol objectiveC protocol issue Detail -> Master communication.
You can use KVO as well.Check this Link : http://2pi.dk/tech/cocoa/kvo_dispatch.html

Related

View Controller trouble in Xcode

I just now figured out how to add a new view when you press a button. For example, in my storyboard, I am using a tabbed controller and in my first viewController i have a button in the top right corner on a navigation bar. and when i press that button, it directs to another view controller. I was wondering how I would be able to write the code for that view controller? I tried creating a new file > objective-c class, but I dont know how to link them together? any help?
If you've made that other controller in the storyboard, you just change the class of that controller to your new class that you made. You do this in the identity inspector.
Use navigation controller to navigate between your view's, You have to make an IBACTION method fot the button. In which you will navigate the view you want by pushviewcontroller.
Please see this link...
How to push viewcontroller ( view controller )?
It implies that which class has to be initialized and what is the nib name of this class. We should not do anything in this block, until you need that your code to be executed before viewDidLoad/viewWillAppear.
Turns out that there is no code necessary to get a button to direct you to another view controller that you set up. You have to declare the button obviously in the #interface part, connect the button with it's code, and then you have to use an action connection from the button to the next view controller you want the button to activate. I have used a modal connection personally, mainly because I'm not sure what a push connection is or what it does... But Ya I figured it out! Hope this helps to any other people who need this!

How do I add a new view to a single view application in Xcode

I started my app as a single view application. I have the view with various buttons and labels connected to code. I want to add a button that links to another view.
I found a tutorial that guided me to click on the project and add a UIView subclass. However there is no option for that ( I think because I started it as a single view application).
I'm pretty new to all this so if anyone can outline a simple way for me to do this that would be great! I am using Xcode version 4.3.2.
Thanks!
You need to add a new Objective C class. Please refer to this:
How to create new View Controllers in XCode 4.3
If you started the app as single view using xib file the to add a class just go to name of the project on the left pane and right click on it. Then choose add new file. The pop up will appear to allow you to choose what type of class you want to add. Depending to what the new view is you can choose uiview controller or uitableview controller and so on. Just make sure you check mark with xib for interface user. That should do it. Hope it helps.
Adrian

Apple Sample Code : Multiple Detail Views

I just downloaded the apple same code Multiple Detail Views.
http://developer.apple.com/library/ios/#samplecode/MultipleDetailViews/Introduction/Intro.html
I was playing around with it to try and figure out how it works, and so far I have only had one problem: when I create my own files/view, there Menu button is not present.
Default first view controller with Menu button
The drop down menu with the third view that I created
The third view that I created, that has no menu button
I poked around the interface builder and there are no buttons there for the default views. Then I found a method in the RootViewController that displays the button.
My problem is that I can't find where the first 2 views call that method to display that button.
Answering my own question here:
In the end, all you have to do is link the view, and the toolbar to the file's owner. You can view a tutorial on how to do that here (in part 3c)

TTWebController with drag refresh

i'm looking three20 and I wish make this thing: use a TTWebController but implement the feature that is shown on the 'Table with drag refresh', drag to the bottom and the webpage will be loaded, showing on the top the arrow like twitter, like many apps... it's possible to do this?
how can I do this?
thanks in advance
Pull to refresh is implemented as a Table View Delegate and the TTWebController is a simple controller with a uiwebview in it.
One way around it would be to create a new TableViewController with the TTTableViewDragRefreshDelegate as the table delegate. You would then create another cell with the web view.
A problem with that solution is that the web view has it's own scroll view and that will take precedence over the tableview scrollview. so you would actually need to make sure you drag the table and not the webview.
All in all I suggest you not do it :) and use a button for the refresh.

steps required to add a UITableViewController as the detail view of a splitView application

I am becoming one sad stackoverflow-er (not flower ) :S
I would like to know the explicit steps required to add a UITableViewController as the detail view of a splitViewController using xCode and Interface Builder. This is an iPad application, so it does not have to run on the iPhone
I have gone through a number of tutorials that create UISplitViews, so I understand the concept. But each of these tutorials add a webview, or simple view controller that shows an image.
The left side of the split view shows a list of menu items that I can customize. that's the popover. no problem.
the right side needs to be a UITableViewController that I an descend and ascend that will have menu items based on the button clicked on the left hand popover.
I also looked this link - http://www.cimgf.com/2010/05/24/fixing-the-uisplitviewcontroller-template/ but the discussion appears to note that it's a "hack" rather than an recognized workflow.
anyone help a brother programmer out? steps are appreciated.
regards,
Edard
Check out any of the examples on the net. Then take the detailViewController and turn it into a UITableViewController.
Alternatively, you can check out the UISplitViewController Class Reference.