How do you rotate buttons on a ToolBar? - objective-c

I have 3 views in my app. Two are in portrait, and one is in landscape. I have a toolbar at the top on the main view that displays in each subview. On the landscape view, I can rotate the tool bar to get it on the top of the "rotated" landscape view, but I can't get the buttons on the toolbar to rotate. Any ideas?

Related

topLayoutGuide not updated after Rotation

I have a viewController (mainView) that supports every orientation on iPhone.
From this view, another viewController is presented with modal style, which only supports only Portrait orientation (and forces the orientation accordingly).
Usually, the topLayoutGuide is at y=20px and the layout of the toolbar right below is attached to that topLayoutGuide
Now i have the following sequence of events
display mainView in portrait orientation
open modal view in portrait orientation
turn to landscape orientation (modal view obviously stays in portrait orientation)
dismiss modal view and return to mainView
After this, the topLayoutGuide is suddenly at y=0px and therefore, the toolbar is positioned over the statusbar, and also keeps that value after rotation in the mainView.
Does anyone know how to update (or force) the topLayoutGuide back to 20px?
You can either adjust insets manually, or you can force the SDK to force to "refresh the orientation" of your controller.

xcode adding button to uitabbarcontroller is not clickable on landscape

I am adding a simple button into a view on a tabbarcontroller to the bottom right of the view. This button is clickable only when it is on portrait, not when the app is flipped to landscape. The app is using autolayout, so I've added two constraints so it hugs the bottom right of the view on landscape and portrait. Horizontal space at 20 and Vertical space at 24. I've tried this on a UIViewController without the UITabBarController, and it works perfectly. But once the view is added to a tab, it stops working. How do I get this button clickable on both portrait and landscape?
This seems like a very simple setup, but I have no idea why this does not work.
![snapshot2]http://ownits-stackoverflow.s3.amazonaws.com/snapshot2.png
![snapshot3]http://ownits-stackoverflow.s3.amazonaws.com/snapshot3.png
I tried the same thing it works. Here is the sample code try to run it on your own simulator and on device.
Sample Project

Shrink detail view controller animated when menu slides at UISplitViewController

I'm working with UISplitViewController on iPad and want to override it's behavior. When user taps on bar button, there are slides menu from the left side of screen. But it overlaps detail view controller. Can I make it so the detail view controller shrinks animated when the menu appears and expands when the menu disappears?
I don't think it's natively possible, so I think of 2 ways of doing this
1 - try and error: study the split delegate calls to see when you should shrink the content in your detail and tune it up until it looks smooth
2 - create your own "split" controller and do all the resizing/presenting by yourself

iPad SplitView with UiScrollView on it shows bottom half of view in landscape

I have a simple iPad app with a UISplitView, I added a UIScrollView to the detail view and everything is fine in portrait orientation. When I go to landscape, the detail view only shows the bottom of the detail view and when I try to scroll to see the top of the view, it springs back down to showing just the bottom half. I am new to this and can't figure out what I am missing.
EDIT: Turning on all 4 Struts of the UIScrollView in IB took care of it.
Turning on all 4 Struts of the UIScrollView in IB took care of it.

iPad: problems with table rows in popovercontrol

I have an iPad application which implements the UISplitViewController. As usual I'm using the popover button to show the root view when the device is in portrait mode.
It's seems to be ok at time of launch, but if I turn the device to landscape, then back to portrait, the table in the popover, will have an additional blank row at top, so that I have to scroll down to see the others...
Where am I doing wrong?