【发布时间】:2014-04-19 05:12:42
【问题描述】:
我有一个 RMQ ruby 运动应用程序。此外,我有一个带有 UINavigation 的屏幕(ProfileController)。即顶部有< Back <title> 导航。点击屏幕上的按钮,我想打开一个带有两个选项卡的新屏幕(HomeController,@ 987654325@)。但是在这个新屏幕上,我想保留我的导航,即< Back 应该将用户带回上一个屏幕。
对于标签,我使用 Promotion 来显示两个标签。要打开选项卡,我在单击按钮时执行此操作:open_tab_bar HomeScreen, HomeScreen2。这一切都很好,但是当标签HomeScreen 显示应用程序时,我失去了导航。
这是代码
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
【问题讨论】:
标签: ios rubymotion