YRSideViewController.h 1.3 KB

1234567891011121314151617181920212223242526272829303132
  1. /*!
  2. * @class 侧边栏控制器,5.0以上系统使用
  3. */
  4. #import <UIKit/UIKit.h>
  5. #import "LeftViewController.h"
  6. typedef void(^RootViewMoveBlock)(UIView *rootView,CGRect orginFrame,CGFloat xoffset);
  7. @interface YRSideViewController : UIViewController
  8. @property (assign,nonatomic) BOOL needSwipeShowMenu;//是否开启手势滑动出菜单
  9. @property (retain,nonatomic) UIViewController *rootViewController;
  10. @property (retain,nonatomic) UIViewController *leftViewController NS_AVAILABLE_IOS(5_0);
  11. @property (retain,nonatomic) UIViewController *rightViewController NS_AVAILABLE_IOS(5_0);
  12. @property (assign,nonatomic) CGFloat leftViewShowWidth;//左侧栏的展示大小
  13. @property (assign,nonatomic) CGFloat rightViewShowWidth;//右侧栏的展示大小
  14. @property (assign,nonatomic) NSTimeInterval animationDuration;//动画时长
  15. @property (assign,nonatomic) BOOL showBoundsShadow;//是否显示边框阴影
  16. @property (copy,nonatomic) RootViewMoveBlock rootViewMoveBlock;//可在此block中重做动画效果
  17. - (void)setRootViewMoveBlock:(RootViewMoveBlock)rootViewMoveBlock;
  18. - (void)showLeftViewController:(BOOL)animated;//展示左边栏
  19. - (void)showRightViewController:(BOOL)animated;//展示右边栏
  20. - (void)hideSideViewController:(BOOL)animated;//恢复正常位置
  21. @end