Ios 如何在导航栏之外创建选项卡栏
我有一个RMQ ruby运动应用程序。此外,我在it ProfileController中有一个带有UINavigation的屏幕。i、 e.它的顶部有Ios 如何在导航栏之外创建选项卡栏,ios,rubymotion,Ios,Rubymotion,我有一个RMQ ruby运动应用程序。此外,我在it ProfileController中有一个带有UINavigation的屏幕。i、 e.它的顶部有
class ProfileController < PM::Screen
...
def show_tabs
open_tab_bar HomeScreen, HomeScreen2
end
...
end
class HomeScreen < PM::Screen
title "Home"
def will_appear
@view_setup ||= set_up_view
self.title = "One"
end
def set_up_view
set_attributes self.view, {
background_color: UIColor.whiteColor
}
set_tab_bar_item system_icon: UITabBarSystemItemFeatured
true
end
end
class HomeScreen2 < PM::Screen
title "Home"
def will_appear
@view_setup ||= set_up_view
self.title = "One"
end
def set_up_view
set_attributes self.view, {
background_color: UIColor.whiteColor
}
set_tab_bar_item system_icon: UITabBarSystemItemFeatured
true
end
end
如您所见,顶部没有导航
问题:
有没有办法添加导航堆栈d不幸的是,您不能使用stock UtiAbar来添加导航堆栈。正如ProMotion的文档所说,它打开选项卡栏作为根视图控制器: 打开具有指定屏幕的UITabBarController,作为当前应用程序的根视图控制器。iOS不允许将UITabBar作为子视图打开