侧滑菜单 residemenu第三方的使用

residemenu 是一个类似QQ和网易新闻的侧滑菜单的第三方框架,使用很简单,但是自己都没有找到一些全面的注释和介绍,所以自己测试了一些属性,记录下。

github上的地址https://github.com/romaonthego/RESideMenu

这个第三方的使用很简单,

RESideMenu *sideMenuViewController = [[RESideMenualloc] initWithContentViewController:tabbar leftMenuViewController:leftMenuViewController

                                                               rightMenuViewController:rightMenuViewController];

    

    [self.windowmakeKeyAndVisible];

    self.window.rootViewController = sideMenuViewController;

调用这个方法,就能实现了左右划菜单的功能,tabbar, leftMenuViewController,rightMenuViewController替换自己的视图页面

通过下面的方法切换页面

[self.sideMenuViewControllerpresentLeftMenuViewController];//切换到左视图

[self.sideMenuViewControllerpresentRightMenuViewController];//切换到右视图

[self.sideMenuViewControllerhideMenuViewController];  //切换到主视图


下面是自己测试的一些属性

@property (assign,readwrite, nonatomic)NSTimeInterval animationDuration;             //动画时间,默认0.35s

@property (strong,readwrite, nonatomic)UIImage *backgroundImage;                     //背景图片

@property (assign,readwrite, nonatomic)BOOL panGestureEnabled;                       //侧滑手势是否开启

@property (assign,readwrite, nonatomic)NSUInteger panMinimumOpenThreshold;           //侧滑有效的滑动长度,默认60

@property (assign,readwrite, nonatomic)IBInspectable BOOL contentViewShadowEnabled;              //是否有阴影,默认no

@property (strong,readwrite, nonatomic)IBInspectable UIColor *contentViewShadowColor;            //阴影颜色,默认是黑色

@property (assign,readwrite, nonatomic)IBInspectable CGSize contentViewShadowOffset;             //阴影的偏移量

@property (assign,readwrite, nonatomic)IBInspectable CGFloat contentViewShadowOpacity;           //阴影透明度

@property (assign,readwrite, nonatomic)IBInspectable CGFloat contentViewShadowRadius;            //阴影图像的角度,默认是8.0f

@property (assign,readwrite, nonatomic)IBInspectable CGFloat contentViewScaleValue;              //高度比列,默认值为0.7,为1时高度不变

@property (assign,readwrite, nonatomic)IBInspectable CGFloat contentViewInLandscapeOffsetCenterX;    //不知道

@property (assign,readwrite, nonatomic)IBInspectable CGFloat contentViewInPortraitOffsetCenterX;     //主视图所剩余的宽度大小,默认是30,越小剩余越多

@property (assign,readwrite, nonatomic)IBInspectable BOOL parallaxEnabled;                       //视差,不太明白什么意思

属性就测试了这么多,还有一些属性看不懂,不过这些属性基本根据自己的需要进行一些调节了,希望有知道的朋友能够补充
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值