Navigation Based Application with Size Classes support and iOS 8

116 Views Asked by At

I want to create a Navigation Based application with support of Size Classes and iOS8. App is using storyboard for all Layouts.

Some Clarifications :

  1. I have already created an application with Single View Controller.

  2. It already has storyboard.

  3. If i add Navigation Controller, then it displays black screen and placement of all the control displays wired.

  4. If i remove Navigation Controller and Make my ViewController it works properly. But i want my app to be Navigation based.

Resulting Work Flow of Storyboard which i expect :

Navigation Controller->View Controller.

My Question

  1. How to create Navigation based app using MasterDetail Controller, where Master Should not be Table View?

Kindly provide a sample code or solutions. it would be much appreciated.

Thanks.

2

There are 2 best solutions below

0
On

Finally, after spending couple of hours I figured out the problem.

  • Following constraints property with NO was removing impact of all the constraints, which i changed to YES and all works perfectly.

    [self.view setTranslatesAutoresizingMaskIntoConstraints:NO];
    
0
On

After setting up the project, remove the UI in the main storyboard. Then drag n drop navigation controller from the object library which contains a table view by default. Then delete the table view controller and add a view controller. Make it your root view controller by ctrl+drag from navigation controller to the new controller and select root view controller in the pop up. Then select the navigation controller and go to Attribute inspector column. Just below View controller option, tick "Is initial view controller" option.

Whoooaa !!! Build and run your application. It should work. Good Luck.