lib/ProMotion/cocoatouch/view_controller.rb in ProMotion-1.2.1 vs lib/ProMotion/cocoatouch/view_controller.rb in ProMotion-2.0.0.rc1
- old
+ new
@@ -1,16 +1,15 @@
module ProMotion
class ViewController < UIViewController
def self.new(args = {})
s = self.alloc.initWithNibName(args[:nib_name] || nil, bundle:args[:bundle] || nil)
- s.on_create(args) if s.respond_to?(:on_create)
+ s.screen_init(args) if s.respond_to?(:screen_init)
s
end
def loadView
- super
- self.send(:on_load) if self.respond_to?(:on_load)
+ self.respond_to?(:load_view) ? self.load_view : super
end
def viewDidLoad
super
self.view_did_load if self.respond_to?(:view_did_load)
@@ -30,12 +29,10 @@
self.view_will_disappear(animated) if self.respond_to?("view_will_disappear:")
super
end
def viewDidDisappear(animated)
- if self.respond_to?("view_did_disappear:")
- self.view_did_disappear(animated)
- end
+ self.view_did_disappear(animated) if self.respond_to?("view_did_disappear:")
super
end
def shouldAutorotateToInterfaceOrientation(orientation)
self.should_rotate(orientation)