登录 立即注册
金钱:

Code4App-iOS开发-iOS 开源代码库-iOS代码实例搜索-iOS特效示例-iOS代码例子下载-Code4App.com

LGSideMenuController

[复制链接]
来自: 李世铿 分类: iOS精品源码 上传时间: 2016-6-16 15:01:41
Tag:侧滑 gesture

项目介绍:

iOS view controller shows left and right views on top of everything by pressing button or gesture.
iOS view controller 显示了左右两个views,可通过点击中间视图的任意按钮或者手势将左右两个弹出的view复原

Installation 安装,支持cocoapods,
CarthageWith source code
直接将下载的源文件拖入项目中

With CocoaPods
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects. To install with cocoaPods, follow the "Get Started" section on CocoaPods.

Podfile 使用cocoapods集成的话,podfile文件中增加以下一行
platform :ios, '6.0'

pod 'LGSideMenuController', '~> 1.0.0'

With Carthage
Carthage is a lightweight dependency manager for Swift and Objective-C. It leverages CocoaTouch modules and is less invasive than CocoaPods. To install with carthage, follow the instruction on Carthage.
Cartfile 使用 Carthage集成的话,cartfile增加以下一行
github "Friend-LGA/LGSideMenuController" ~> 1.0.0



Usage 使用方法
[Objective-C] 查看源文件 复制代码
In the source files where you need to use the library, import the header file:

#import "LGSideMenuController.h"


Initialization 初始化
[Actionscript3] 查看源文件 复制代码
In the source files where you need to use the library, import the header file:

#import "LGSideMenuController.h"



Setup 开始集成
[Objective-C] 查看源文件 复制代码
To enable left or right or both views call:

- (void)setLeftViewEnabledWithWidth:(CGFloat)width
                  presentationStyle:(LGSideMenuPresentationStyle)presentationStyle
               alwaysVisibleOptions:(LGSideMenuAlwaysVisibleOptions)alwaysVisibleOptions;   // for example you can make view always visible on ipad landscape orientation

- (void)setRightViewEnabledWithWidth:(CGFloat)width
                   presentationStyle:(LGSideMenuPresentationStyle)presentationStyle
                alwaysVisibleOptions:(LGSideMenuAlwaysVisibleOptions)alwaysVisibleOptions;  // for example you can make view always visible on ipad landscape orientation


Quick Example
[Objective-C] 查看源文件 复制代码
ViewController *viewController = [ViewController new];

UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewController];

LGSideMenuController *sideMenuController = [[LGSideMenuController alloc] initWithRootViewController:navigationController];

[sideMenuController setLeftViewEnabledWithWidth:250.f
                              presentationStyle:LGSideMenuPresentationStyleScaleFromBig
                           alwaysVisibleOptions:0];

TableViewController *leftViewController = [TableViewController new];

[sideMenuController.leftView addSubview:leftViewController.tableView];



Notifications
[Objective-C] 查看源文件 复制代码
kLGSideMenuControllerWillShowLeftViewNotification;
kLGSideMenuControllerWillDismissLeftViewNotification;
kLGSideMenuControllerDidShowLeftViewNotification;
kLGSideMenuControllerDidDismissLeftViewNotification;

kLGSideMenuControllerWillShowRightViewNotification;
kLGSideMenuControllerWillDismissRightViewNotification;
kLGSideMenuControllerDidShowRightViewNotification;
kLGSideMenuControllerDidDismissRightViewNotification;



DEMO下载:




相关源码推荐:

我来说两句
*滑动验证:
所有评论(143)
李伟鹏 2016-6-16 15:33:59
强烈支持楼主ing……
回复
fst_hangeng 2016-6-16 15:34:37
淡定,淡定,淡定……
回复
王颖博 2016-6-16 16:59:31
很给力,Code4App有你更精彩!
回复
gdyer 2016-6-16 17:39:56
谢谢大神,谢谢你的分享!
回复
bluevalley 2016-6-16 17:39:55
谢谢大神,谢谢你的分享!
回复
blueboyhi 2016-6-16 17:40:07
code4app有你更精彩!
回复
腾飞 2016-6-16 17:40:16
code4app有你更精彩!
回复
zz_weiyi 2016-6-16 17:41:09
学习了,mark收藏
回复
seven060601 2016-6-16 17:41:15
学习了,mark收藏
回复
提取码:  下载次数:87 状态:已购或VIP 售价:0(原价:10)金钱 下载权限:初级码农 
5407 0 87
联系我们
首页/微信公众账号投稿

帖子代码编辑/版权问题

QQ:435399051,742864542

如何获得代码达人称号?

代码贡献英雄榜
用户名 下载数
通过邮件订阅最新 Code4App 信息
上一条 /4 下一条
联系我们
关闭
合作电话:
13802416937
Email:
435399051@qq.com
商务市场合作/投稿
问题反馈及帮助
联系我们

广告投放| 广东互联网违法和不良信息举报中心|中国互联网举报中心|Github|申请友链|手机版|Code4App ( 粤ICP备15117877号-1 )

快速回复 返回顶部 返回列表