UIBarButtonItem with separate portrait and landscape images - layoutSubviews not called when popping a view controller from UINavigationController
问题 I want to show completely custom buttons in UINavigationController's UIToolbar, and support portrait and landscape . Currently I have implemented a RotatingButton (a UIView subclass) class, which contains one UIButton that fills the whole RotatingButton frame. A RotatingButton also contains two images, for portrait and landscape orientations, and the heights of these images differ. Then this RotatingButton gets wrapped into UIBarButtonItem as a custom view. Currently, in RotatingButton's