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