侧滑菜单 residemenu第三方的使用
2016-08-10 16:24
127 查看
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; //视差,不太明白什么意思
属性就测试了这么多,还有一些属性看不懂,不过这些属性基本根据自己的需要进行一些调节了,希望有知道的朋友能够补充
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; //视差,不太明白什么意思
属性就测试了这么多,还有一些属性看不懂,不过这些属性基本根据自己的需要进行一些调节了,希望有知道的朋友能够补充
相关文章推荐
- 第三方侧滑菜单SlidingMenu在android studio中的使用
- 使用AndroidResideMenu开源框架实现QQ5.0侧滑菜单
- 第三方侧滑菜单SlidingMenu在android studio中的使用
- Xamarin.Android中使用ResideMenu实现侧滑菜单
- Android侧滑菜单之DrawerLayout的使用
- Android第三方类库:slidingmenu 实现侧滑菜单
- SlidingMenu 开源库侧滑菜单的使用
- 【案例分享】仿QQ5.0侧滑菜单ResideMenu
- SlindingMenu 侧滑菜单框架使用
- android侧滑菜单框架SlidingMenu的使用
- 在DELPHI7中不使用任何第三方控件,实现放在工具栏上可拖动的XP风格菜单.
- ios-day17-08(手势识别器之“拖拽”,使用UIPanGestureRecognizer实现侧滑菜单)
- (转)在DELPHI7中不使用任何第三方控件,实现放在工具栏上可拖动的XP风格菜单
- 使用Fragment+SlidingMenu实现侧滑显示菜单
- (4.1.34)Android侧滑菜单DrawerLayout的使用
- Android-- 高仿QQ5.2双向侧滑菜单 使用DrawerLayout
- 使用HorizontalScrollView实现侧滑菜单
- 简单好用的Android侧滑菜单(实现起来超简单哦,不用第三方开源库)<上>
- android初学------SlidingMenu(侧滑菜单的使用—)
- 仿QQ5.0侧滑菜单【AndroidResideMenu】