I have some UIButtons that when shows in portrait look like this
When I rotate the device to landscape, I want the label to be underneath the image.
I've seen this answer to getting the label beneath the button image - Label under image in UIButton but can't figure out how and where to implement this on device rotation that is safe.
My view hierarchy for this section looks like this with the UIScrollView as subview of the main UIView
I am targeting iOS 8 and using AutoLayout. I have seen some answers using layoutSubviews
for other questions that do something similar but I've seen that layoutSubviews
will be called on each rotation. I need this to only happen on landscape layouts.