测试已测试 | ✗ |
语言语言 | Obj-CObjective C |
许可证 | BSD 3.0 |
发布最新版本 | 2015年5月 |
由 Steven Mattera 维护。
方便的抽屉控制器,模拟 Google 的材质设计中的抽屉。
CocoaPods 是 Objective-C 的依赖管理器,它自动简化了在项目中使用第三方库安装的过程。要使用 CocoaPods 安装此库,简单地在 Podfile 添加以下行
pod 'LDSlideOverViewController'
将 LDSlideOverViewController 类的视图控制器添加到您的 storyboard 中。然后拖动两个其他视图控制器,并为它们分配 storyboard ID。一个用于左侧抽屉,另一个用于主内容。然后,您可以定义以下运行时属性到您的 LDSlideOverViewController,使其知道要使用的视图控制器:
名称 | 类型 | 描述 |
---|---|---|
mainIdentifier | String | 主抽屉的 storyboard 标识符。 |
leftIdentifier | String | 左侧抽屉的 storyboard 标识符。 |
slideGestureEnabled | Boolean | 是否启用左右滑动手势。 |
使用 LDSlideOverViewController 和 initWithMainViewController:withLeftViewController: 创建您的抽屉控制器。
LDSlideOverViewController 在 BSD 2-Clause 许可证下发布
Copyright (c) 2014 Lepidus Development, LLC. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.
Neither the name of the Lepidus Development, LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.