module Momentum::ViewControllerModule

Attributes

class_title[RW]
delegate[RW]
delegate_class[RW]
stylesheet_class[RW]
view_class[RW]

Public Class Methods

included(base) click to toggle source
# File lib/motion-momentum-ios/controller/view_controller_module.rb, line 4
def self.included(base)
  base.extend(ClassMethods)
end

Public Instance Methods

init() click to toggle source
Calls superclass method
# File lib/motion-momentum-ios/controller/view_controller_module.rb, line 41
def init
  super
  self.view_class = find_related_class('View')
  self.delegate_class = find_related_class('Delegate')
  self.stylesheet_class = find_related_class('Stylesheet')
  self
end
loadView() click to toggle source
# File lib/motion-momentum-ios/controller/view_controller_module.rb, line 49
def loadView
  self.view = (self.view_class || UIView).new
  self.delegate = (self.delegate_class || Delegate).new
  self.view.delegate = self.delegate if self.view.class.instance_methods.include?(:delegate)
  self.view.dataSource = self.delegate if self.view.class.instance_methods.include?(:dataSource)
end
title() click to toggle source
Calls superclass method
# File lib/motion-momentum-ios/controller/view_controller_module.rb, line 61
def title
  super || class_title
end
viewDidLoad() click to toggle source
Calls superclass method
# File lib/motion-momentum-ios/controller/view_controller_module.rb, line 56
def viewDidLoad
  super
  self.setup if self.class.instance_methods.include?(:setup)
end

Private Instance Methods