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.
+3
source to share
No one has answered this question yet
Check out similar questions: