lib/ProMotion/screen/screen_module.rb in ProMotion-2.5.0.beta1 vs lib/ProMotion/screen/screen_module.rb in ProMotion-2.5.0
- old
+ new
@@ -5,11 +5,12 @@
include ProMotion::Styling
include ProMotion::NavBarModule
include ProMotion::Tabs
include ProMotion::SplitScreen if UIDevice.currentDevice.userInterfaceIdiom == UIUserInterfaceIdiomPad || (UIDevice.currentDevice.systemVersion.to_i >= 8 )
- attr_accessor :parent_screen, :first_screen, :modal, :split_screen
+ attr_reader :parent_screen
+ attr_accessor :first_screen, :modal, :split_screen
def screen_init(args = {})
@screen_options = args
check_ancestry
resolve_title
@@ -152,10 +153,10 @@
end
def add_child_screen(screen)
screen = screen.new if screen.respond_to?(:new)
addChildViewController(screen)
- screen.parent_screen = WeakRef.new(self)
+ screen.parent_screen = self
screen.didMoveToParentViewController(self) # Required
screen
end
def remove_child_screen(screen)