romaonthego / REFrostedViewController

iOS 7/8 style blurred view controller that appears on top of your view controller.
MIT License
2.96k stars 494 forks source link

Rotation Problem #25

Closed ehlersd closed 10 years ago

ehlersd commented 10 years ago

I have 3 View Controllers in my storyboard....Root, Menu & Content.

Prior to adding this menu, the Content would rotate fine on my iPad (basically just a collection view and a navbar).

After adding this control (and the Root & Menu controllers), the screen rotates fine, but the Content controller does NOT rotate, leaving the navbar title not centered, and the sizing of the collection view doesn't change (to allow more columns on landscape).

romaonthego commented 10 years ago

It seems to be working in the example project. Did you try adding the collection view to the example project to see if it's still working?

ehlersd commented 10 years ago

The example seems to work fine, but I'm not sure if the problem is in my Storyboard, or has something to do with the iPad vs iPhone. Basically, when rotating my app on the iPad, the RootViewController background is showing thru.

screen shot 2013-10-22 at 12 40 20 pm

ios simulator screen shot oct 22 2013 12 39 39 pm

ios simulator screen shot oct 22 2013 12 39 31 pm

romaonthego commented 10 years ago

I'm pretty sure that the problem is in your storyboard. I've converted the example project to Universal target and it still works fine.

ehlersd commented 10 years ago

Any thoughts or ideas on where in the storyboard to look? I've spent a couple of hours digging thru this and cannot find anything that makes a difference.

romaonthego commented 10 years ago

No idea, I never use storyboards...

ehlersd commented 10 years ago

Well, I created a new example, stripped down with just the bare necessities, and it doesn't appear to work correctly.

Here's a repo with my test.

https://github.com/ehlersd/REFrostedViewControllerRotationTest

Hope this helps.

romaonthego commented 10 years ago

You're doing something that doesn't make sense at all (manually adding a UINavigationBar to a view controller). You need to check UINavigationController programming guides. Please take another look at my example project and pay close attention at classes that I'm using and how it's structured.

romaonthego commented 10 years ago

I added an iPad storyboard to my example project, I think it should be a good starting point for you.

ehlersd commented 10 years ago

Well, the NavBar was only added to help me mockup some stuff. I removed it and replaced it with a simple UIView. Same problem....the "contentController" doesn't resize.

I'm my test project, I followed your description and instructions to a "T".

pranavt commented 10 years ago

Stuck with the same problem.

The container rotates but the child view controllers don't resize/layout as per the rotation. I'm sure it's just a small setting somewhere that I seem to have missed but I cannot figure it out for the life of me. Any help will be appreciated. Using storyboards...

PS: The issue exists in your storyboard example too. I just ran it in the simulator and it shows the same issue. Run the example, rotate device left or right. The child view controller doesn't resize.