Sha256: b35ce9a881d75a41785ba4cd1c6576890774b484808490c60921885c11797970

Contents?: true

Size: 1.48 KB

Versions: 4

Compression:

Stored size: 1.48 KB

Contents

module ProMotion
  class ViewController < UIViewController
    def self.new(args = {})
      s = self.alloc.initWithNibName(args[:nib_name] || nil, bundle:args[:bundle] || nil)
      s.screen_init(args) if s.respond_to?(:screen_init)
      s
    end

    def loadView
      self.respond_to?(:load_view) ? self.load_view : super
    end

    def viewDidLoad
      super
      self.view_did_load if self.respond_to?(:view_did_load)
    end

    def viewWillAppear(animated)
      super
      self.view_will_appear(animated) if self.respond_to?("view_will_appear:")
    end

    def viewDidAppear(animated)
      super
      self.view_did_appear(animated) if self.respond_to?("view_did_appear:")
    end

    def viewWillDisappear(animated)
      self.view_will_disappear(animated) if self.respond_to?("view_will_disappear:")
      super
    end

    def viewDidDisappear(animated)
      self.view_did_disappear(animated) if self.respond_to?("view_did_disappear:")
      super
    end

    def didReceiveMemoryWarning
      self.did_receive_memory_warning if self.respond_to?(:did_receive_memory_warning)
      super
    end

    def shouldAutorotateToInterfaceOrientation(orientation)
      self.should_rotate(orientation)
    end

    def shouldAutorotate
      self.should_autorotate
    end

    def willRotateToInterfaceOrientation(orientation, duration:duration)
      self.will_rotate(orientation, duration)
    end

    def didRotateFromInterfaceOrientation(orientation)
      self.on_rotate
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ProMotion-2.6.1 lib/ProMotion/cocoatouch/view_controller.rb
ProMotion-2.6.0 lib/ProMotion/cocoatouch/view_controller.rb
ProMotion-2.5.0 lib/ProMotion/cocoatouch/view_controller.rb
ProMotion-2.5.0.beta1 lib/ProMotion/cocoatouch/view_controller.rb