mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-05-28 23:50:54 +08:00
Allow popping to the root view controller in the nav stack.
This commit is contained in:
committed by
Jamon Holmgren
parent
2da5fe93df
commit
ed862648bb
@@ -14,7 +14,7 @@ module ProMotion
|
||||
self.split_screen.detail_screen = screen
|
||||
|
||||
elsif args[:in_master] && self.split_screen
|
||||
self.split_screen.master_screen = screen
|
||||
self.split_screen.master_screen = screen
|
||||
|
||||
elsif args[:close_all]
|
||||
open_root_screen screen
|
||||
@@ -41,6 +41,10 @@ module ProMotion
|
||||
app_delegate.open_root_screen(screen)
|
||||
end
|
||||
|
||||
def pop_to_root(animated = false)
|
||||
self.navigation_controller.popToRootViewControllerAnimated animated
|
||||
end
|
||||
|
||||
def open_modal(screen, args = {})
|
||||
open screen, args.merge({ modal: true })
|
||||
end
|
||||
@@ -94,7 +98,7 @@ module ProMotion
|
||||
|
||||
# Instantiate screen if given a class
|
||||
screen = screen.new if screen.respond_to?(:new)
|
||||
|
||||
|
||||
# Set parent
|
||||
screen.parent_screen = self if screen.respond_to?(:parent_screen=)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user