I have an app that is going to a UISpeltView (completely inside another view):
- (zero) switchtime dualview {nslog (@ "show my day screen"); If (self.myDayController.view.superview == zero) {if (self.myDayController == zero) {MyDayController * myController = [[MyDayController alloc] initWithNibName: @ "Maida" bundle: zero]; Self.myDayController = myController; [MyController release]; } [Remove the HomeScreenController.viewprovisionview]; [Insert Self.viewSeeview: self.myDayController.view atIndex: 0]; }}
which is done on the main navigation screen
Now, the MIDI Controller has an XIB, which is called MyDi.Axib, in which these items are:
File owner: Maiden Controller
First Respondent: UIResponder
Split View Controller
--- - & gt; Navigation Controller --- - & gt; Navigation bar ---- & gt; Table View Controller ---- & gt; Navigation items ---- & gt; See the controller
So, I need some more components here, do I need a UITableViewController and a UISplitViewControllerDelegate right?
I was just going to implement these protocols in my mobile operator, is this standard?
So, after the above code, I get an error:
- [UIViewController _loadViewFromNibNamed: bundle:] "Maida" was loaded but view outlet was not set I went.
So, how can I fix this by using UISplitViewController? I know that UISplitViewController has a visual property, but I can not use it / can connect it to IB?
Thank you very much
Mark
You must have a UISplitViewController subclass Should not. What is the behavior in your "MyDayController" class? UISplitViewController basically handles master and detail view laying for you, so your responsibility is to implement those controllers.
If the partition view is at the top level of your app, you can find it on your app's main window Can be added to the nib. If it is not, then make it programmatically:
- (zero) switchtimediview {NSLog (@ "show my day screen"); If (self.myDayController == zero) {YourMasterViewController * masterViewController = [[YourMasterViewController alloc] initWithNibName: @ "Masterview" bundle: zero]; YourDetailViewController * detailViewController = [[YourDetailViewController alloc] initWithNibName: @ "DetailView" bundle: zero]; UISplitViewController * myController = [[UISplitViewController alloc] init; MyController.viewControllers = [Objects with NSArray array: MasterviewController, Description Controller, Zero]; [MasterViewCentroler release]; [DetailViewController release]; Self.myDayController = myController; [MyController release]; } [Remove the HomeScreenController.viewprovisionview]; [Insert Self.viewSeeview: self.myDayController.view atIndex: 0]; }
You do not need to test for self.myDayController.view.superview == zero
because it is in self.myDayController == Zero < / Code>
Comments
Post a Comment