DRRevealViewController 0.0.1

DRRevealViewController 0.0.1

测试已测试
语言语言 Obj-CObjective C
授权协议 MIT
发布时间最新发布2015年2月

David Runemalm 维护。



示例

alt tag

描述

当您想以某种方式显示位于前端视图控制器后面的视图控制器时,请使用 DRRevealViewController。典型的用法包括类似于 Eurosport iPhone 应用程序中的“滑动菜单”(见上面的示例)。

  • 实现类似 Facebook 或 Eurosport iPhone 应用程序中的菜单。
  • 通过实现 'revealWithPercent' 委托方法,可以轻松自定义显示动画。

版本

版本 0.0.1

用法

要运行示例项目,请克隆存储库,然后从 Example 目录中首先运行 pod install

以下是一个速成示例,展示了您的实例可能的样子

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil];
    DRFrontViewController<DRRevealWrappedFrontControllerDelegate> *frontViewController = [storyBoard instantiateViewControllerWithIdentifier:@"FrontView"];
    DRMenuViewController<DRRevealSideControllerDelegate> *menuViewController = [storyBoard instantiateViewControllerWithIdentifier:@"MenuView"];

    DRRevealViewController *revealViewController = [[DRRevealViewController alloc] initWithLeftViewController:menuViewController
                                                        andWrapNeedingFrontViewController:frontViewController];

    self.window.rootViewController = revealViewController;
    [self.window makeKeyAndVisible];

    return YES;
}

要求

安装

作者

David Runemalm, [email protected]

授权协议

DRRevealViewController 在 MIT 授权协议下提供。有关更多信息,请参阅 LICENSE 文件。