hishamaus
hishamaus

Reputation: 183

Modal View With Current Context Display in Full Screen in iOS 8

As you can see from the first image attached, in our application we have a split view controller that contains in the master: a tab bar controller. in the detail: a navigation controller with a root.

Application Setup

Whenever we try to present a modal view controller from the master view (from the button that says 'Do Stuff'), instead of the new view controller being displayed in the same frame as the master, it is displayed in full screen size as seen in the second screenshot. We have already set the modal presentation style to 'Current Context' We tried to set the master as 'Defines Context' and 'Provides Context' with no luck. We also tried to set 'Current Context' in all view controllers in the storyboard, no luck either.

Full Screen View Controller instead of Current Context

Funnily, if you rotate the device just once to Portrait and back to Landscape, the modal view controller is displayed correctly (not full screen, just the same frame as the master).

This is not an issue in iOS 7. Everything works perfect in 7. It only happens in iOS 8.

P.S. we tried to create all views both using StoryBoards and programatically. Same issue.

Has anyone come across this issue? and know how to fix it?

Upvotes: 2

Views: 1469

Answers (1)

Saqib Omer
Saqib Omer

Reputation: 5477

Current Context is deprecated in iOS8. Use "Over Current Context" instead. Here is what you need to do. If iOS8 than present "over current context". If iOS7 present "current context".

Upvotes: 2

Related Questions