YRSideViewController.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // YRSideViewController.h
  3. // YRSnippets
  4. //
  5. // Created by 王晓宇 on 14-5-10.
  6. // Copyright (c) 2014年 王晓宇. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @protocol YRSideViewControllerDelegate
  10. -(void)moveMenu:(NSInteger)left;
  11. -(void)shoMenu:(NSString *) direction; //方向 left right
  12. @end
  13. typedef void(^RootViewMoveBlock)(UIView *rootView,CGRect orginFrame,CGFloat xoffset);
  14. @interface YRSideViewController : UIViewController
  15. @property (assign,nonatomic) BOOL needSwipeShowMenu;//是否开启手势滑动出菜单
  16. @property (retain,nonatomic) UIViewController *rootViewController;
  17. @property (retain,nonatomic) UIViewController *leftViewController NS_AVAILABLE_IOS(5_0);
  18. @property (retain,nonatomic) UIViewController *rightViewController NS_AVAILABLE_IOS(5_0);
  19. @property (assign,nonatomic) CGFloat leftViewShowWidth;//左侧栏的展示大小
  20. @property (assign,nonatomic) CGFloat rightViewShowWidth;//右侧栏的展示大小
  21. @property (assign,nonatomic) NSTimeInterval animationDuration;//动画时长
  22. @property (assign,nonatomic) BOOL showBoundsShadow;//是否显示边框阴影
  23. @property (copy,nonatomic) RootViewMoveBlock rootViewMoveBlock;//可在此block中重做动画效果
  24. - (void)setRootViewMoveBlock:(RootViewMoveBlock)rootViewMoveBlock;
  25. - (void)showLeftViewController:(BOOL)animated;//展示左边栏
  26. - (void)showRightViewController:(BOOL)animated;//展示右边栏
  27. - (void)hideSideViewController:(BOOL)animated;//恢复正常位置
  28. @property id<YRSideViewControllerDelegate>delegate;
  29. @end