继承: UIViewController
属性:
1.direction: 抽屉出来的方向, 枚举值
{
REFrostedViewControllerDirectionLeft, 左边
REFrostedViewControllerDirectionRight, 右边
REFrostedViewControllerDirectionTop, 上
REFrostedViewControllerDirectionBottom 下
}
2. blurTintColor :边线颜色
如图, 中间的那条红线
3. blurRadius: 默认10.0f
仅仅在live blur 是 关闭的时候 使用
很少使用到
4. blurSaturationDeltaFactor: 默认1.8f
仅仅在live blur 是 关闭的时候 使用
很少自己定制
5. animationDuration: 抽屉动画出来的时间
默认0.35s
6. limitMenuViewSize: BOOL值, 经测试没什么用
7. minimumMenuViewSize: CGSize, 抽屉出来的尺寸
只能设置size, 从屏幕(0, 0)出来, 不能设置point
8. liveBlur: BOOL值, 经测试没用
9. liveBlurBackgroundStyle: 透明部分背景样式
//枚举值, 亮色和暗色, 不过没什么大的区别
{
REFrostedViewControllerLiveBackgroundStyleLight,
REFrostedViewControllerLiveBackgroundStyleDark
};
10. contentViewController : UIViewController, 正文显示部分
11. menuViewController: UIViewController抽屉的侧栏
方法:
1. 初始化
- (id)initWithContentViewController:(UIViewController *)contentViewController menuViewController:(UIViewController *)menuViewController;
2. 显示侧边栏
- (void)presentMenuViewController;
3. 隐藏侧边栏
- (void)hideMenuViewController;
4. 在添加侧拉手势
- (void)panGestureRecognized:(UIPanGestureRecognizer *)recognizer;
分类
UIViewController+REFrostedViewController.h
添加一个属性:frostedViewController: REFrostedViewController, 方便查找到抽屉控制器