I currently have a view controller that has UIScrollView region at the top that loads images from a website and a bunch of text labels below it in portrait mode. I want to allow the user to double tap the image region and when done so, the app should switch to landscape mode and show the scrolling images in fullscreen and should return to portait mode on double tap. I also want to display the image in fullscreen landscape if the device is rotated to landscape mode. How do I go about doing this?
Asked
Active
Viewed 39 times
0
-
Look at `viewWillTransitionToSize:withTransitionCoordinator:` and see if the width > height. That means that you went to landscape, so you could present the image VC – Lou Franco Aug 03 '17 at 20:23
-
@LouFranco - that will definitely work on rotation, but will that work with a double tap? – Aug 03 '17 at 22:00
-
https://stackoverflow.com/questions/26357162/how-to-force-view-controller-orientation-in-ios-8/28220616#28220616 – Lou Franco Aug 04 '17 at 13:12