【问题标题】:How to combine sliding menu and uitabbarcontroller?如何结合滑动菜单和uitabbarcontroller?
【发布时间】:2016-08-24 14:40:41
【问题描述】:

我正在尝试将UITabBarController 与滑动菜单集成。我正在使用SWRevealViewController 创建滑动菜单。

以下是我的故事板的图片。

TabView 仅对新闻可见。我希望它像 android 一样像一个新视图。在 android 中,我们可以将 Navigation Drawer 和 TabPager 结合起来。 如何在 iOS 中执行此操作?

【问题讨论】:

标签: ios objective-c uitabbarcontroller slidingmenu swrevealviewcontroller


【解决方案1】:

尝试如下:

MainTabViewController *frontViewController = [[MainTabViewController alloc] init];
RearViewController *rearViewController = [[RearViewController alloc] init];

UINavigationController *frontNavigationController = [[UINavigationController alloc] initWithRootViewController:frontViewController];
UINavigationController *rearNavigationController = [[UINavigationController alloc] initWithRootViewController:rearViewController];

SWRevealViewController *revealController = [[SWRevealViewController alloc] initWithRearViewController:rearNavigationController frontViewController:frontNavigationController];
revealController.delegate = self;

self.viewController = revealController;
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];           

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-08-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-05
    • 2023-04-08
    相关资源
    最近更新 更多