SegmentManagingView
I am trying to do something like above link. I set the Rotation code in my segmentmanagingview
But it is not resizing in landscape mode.Table's wi开发者_开发问答dth is 320 px in landscape and portrait mode.Any other way to achieve this?
First read Apple's Why won't my UIViewController rotate with the device or the many links on SO to see if rotation is being allowed. Most of the time this will fix it. Other approaches are:
- Implement
didRotateFromInterfaceOrientation
and implement a relocation (setting new centers for each view). - Duplicate the view and swap the subviews (iterating the subviews and replacing one with the other).
- Switch views (create a landscape and portrait view on the same nib and change the active view).
There are examples for all three techniques on the iPhone Developer's Cookbook from Erica Sadun. The source code is free to download, look for chapters 2-3.
精彩评论