more clear now

This commit is contained in:
Stephan Toggweiler
2013-03-23 19:54:19 +01:00
parent 9e24520e67
commit d0bdcb8765
2 changed files with 12 additions and 4 deletions

View File

@@ -44,9 +44,8 @@ module ProMotion
end
split = SplitViewController.alloc.init
split.delegate=args[:screen2]
args[:screen1].view_screen=split
#args[:screen2].parent_screen=args[:screen1]
split.tabBarItem=create_tab_bar_item(title: args[:title])
args[:screen1].split_screen=split
split.tabBarItem=create_tab_bar_icon_custom(args[:title], args[:icon], 0)
scr=[]
[args[:screen1], args[:screen2]].each do |s|
if s.navigation_controller

View File

@@ -5,7 +5,7 @@ module ProMotion
include ProMotion::SystemHelper
include ProMotion::ScreenTabs
attr_accessor :parent_screen, :first_screen, :tab_bar_item, :tab_bar, :modal
attr_accessor :parent_screen, :first_screen, :tab_bar_item, :tab_bar, :modal, :split_screen
def on_create(args = {})
unless self.is_a?(UIViewController)
@@ -26,6 +26,15 @@ module ProMotion
self.modal == true
end
def is_split_screen?
self.split_screen.nil? != true
end
def open_in_split_screen(screen)
a=[self.split_screen.viewControllers[0], screen.main_controller]
self.split_screen.viewControllers=a
end
def has_nav_bar?
self.navigation_controller.nil? != true
end