Why is viewWillTransitionToSize the wrong size?

I am adjusting the limit in the iOS8 rotation delegation method, but the size is not the same as what I can see on the device, why?

override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {

    println("size: \(size)")
    super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator)
    widthConstraint.constant = (size.width / 8.0) - 4.0
}

      

size: (1024.0,768.0)

But the actual size is smaller than the full size of the iPad.

Testing on a real device and viewController is a built-in container view controller.

I seem to be getting the size of the parentViewController view somehow.

enter image description here

+3
ios rotation uiviewcontroller ios8


source to share


No one has answered this question yet

Check out similar questions:

1300
Transferring data between view controllers
2
Container View Controller how to find size of child view controller in sizeForChildContentContainer
2
after iOS 8 main view controller splitviewcontroller does not change height when rotated
1
Shortening or resizing UIView after rotating device
0
NavigationController willRotateToInterfaceOrientation not called if I change the orientation of the topview control in iOS 8
0
iOS: Restrictions are lifted when returning to View Controller after orientation change
0
ViewDeck size of left UIViewController
0
How to detect device orientation change on iPad iOS 9+ when lock is set outside?
0
viewWillTransitionToSize safeArea and presentViewController
0
viewWillTransitionToSize calls wrong ViewController in TabBarController



All Articles
Loading...
X
Show
Funny
Dev
Pics