lib/ProMotion/cocoatouch/view_controller.rb in ProMotion-1.0.4 vs lib/ProMotion/cocoatouch/view_controller.rb in ProMotion-1.1.0.rc1
- old
+ new
@@ -1,12 +1,12 @@
module ProMotion
class ViewController < UIViewController
def self.new(args = {})
- s = self.alloc.initWithNibName(nil, bundle:nil)
+ s = self.alloc.initWithNibName(args[:nib_name] || nil, bundle:args[:bundle] || nil)
s.on_create(args) if s.respond_to?(:on_create)
s
end
-
+
def loadView
super
self.send(:on_load) if self.respond_to?(:on_load)
end