// Wait for a better solution
- (void)setFrame:(CGRect)frame {
// Adapt iOS 11 if is a titleView
if (@available(iOS 11.0, *)) {
if (self.showOnNavigationBar) { frame.origin.x = 0; }
}
[super setFrame:frame];
// ...
// ...
}
FIX #286, Layout Stragety adjusted.
- Now: WMPageController will layout every time when
-viewDidLayoutSubviews
called. - Before: Early returned if
self.view.frame.size.height
is not changed.
[IMPORTANT] WMPAGECONTROLLER ARE NO LONGER ADAPT VIEW'S FRAMES & SOME GESTURES CONFLICTS!!
viewFrame / menuHeight / menuBGColor / menuViewBottomSpace / otherGestureRecognizerSimultaneously
-pageController:preferredFrameForMenuView:
-pageController:preferredFrameForContentView:
- If you want a right frame of menuView or contentView, implement
-pageController:preferredFrameForMenuView: & -pageController:preferredFrameForContentView:
methods and give WMPageController a right frame. - Call
-forceLayoutSubViews
to re-layout view's frames, these will recall the datasource methods above. - Change menuView's backgroundColor by setting
self.menuView.backgroundColor = perferredColor
directly.(AFTER THE VIEW IS LOADED, e.g. in viewDidLoad) - Deal gesture's conflicts by implement
UIGestureRecognizerDelegate
IF NEEDED, see UIGestureRecognizerDelegate for more information.
OLD VERSION & NO LONGER MAINTAIN