Sha256: 19e1efdfb44521c9909ab2cf12822df499bbc21d526c145c3d052d297620b204

Contents?: true

Size: 1.34 KB

Versions: 6

Compression:

Stored size: 1.34 KB

Contents

module ProMotion
  class CollectionViewController < UICollectionViewController
    def self.new(args = {})
      s = self.alloc.initWithCollectionViewLayout(get_collection_layout)
      s.screen_init(args) if s.respond_to?(:screen_init)
      s
    end

    def init
      super.tap do
        screen_init if respond_to?(:screen_init)
      end
    end

    def loadView
      self.respond_to?(:load_view) ? self.load_view : super
    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 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

6 entries across 6 versions & 1 rubygems

Version Path
ProMotion-3.0.0 lib/ProMotion/cocoatouch/collection_view_controller.rb
ProMotion-2.8.2 lib/ProMotion/cocoatouch/collection_view_controller.rb
ProMotion-2.8.1 lib/ProMotion/cocoatouch/collection_view_controller.rb
ProMotion-2.8.0 lib/ProMotion/cocoatouch/collection_view_controller.rb
ProMotion-2.7.1 lib/ProMotion/cocoatouch/collection_view_controller.rb
ProMotion-2.7.0 lib/ProMotion/cocoatouch/collection_view_controller.rb