Sha256: af88890cbb670784ec878f59335cc59d47b8c8c205788d02fb1935382955b818
Contents?: true
Size: 1.56 KB
Versions: 1
Compression:
Stored size: 1.56 KB
Contents
module ProMotion module Formotion class FormotionScreen < ::Formotion::FormController # Can also be < UIViewController include ::ProMotion::ScreenModule # Not TableScreenModule since we're using Formotion for that # Required functions for ProMotion to work properly def form_data {} end def self.new(args = {}) s = self.alloc s.on_create(args) if s.respond_to?(:on_create) @local_form=::Formotion::Form.new(s.form_data) if s.respond_to?(:on_submit) @local_form.on_submit do |form| s.on_submit(form.render) end end s.initWithForm(@local_form) 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 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 end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ProMotion-formotion-0.0.7 | lib/ProMotion/formotion/formotion_screen.rb |