class Stronglyboards::ViewController
Constants
- UICOLLECTIONVIEWCONTROLLER
- UINAVIGATIONCONTROLLER
- UIPAGEVIEWCONTROLLER
- UISPLITVIEWCONTROLLER
- UITABBARCONTROLLER
- UITABLEVIEWCONTROLLER
- UIVIEWCONTROLLER
Attributes
class_name[R]
storyboard_identifier[R]
Public Class Methods
new(xml, is_initial_view_controller = false)
click to toggle source
# File lib/stronglyboards/view_controller.rb, line 15 def initialize(xml, is_initial_view_controller = false) @class_name = xml.attr('customClass') || class_name_from_type(xml) @storyboard_identifier = xml.attr('storyboardIdentifier') @is_initial_view_controller = is_initial_view_controller end
Public Instance Methods
initial_view_controller?()
click to toggle source
# File lib/stronglyboards/view_controller.rb, line 21 def initial_view_controller? @is_initial_view_controller end
Private Instance Methods
class_name_from_type(xml)
click to toggle source
Determines the name of the class from this view controller's type
# File lib/stronglyboards/view_controller.rb, line 27 def class_name_from_type(xml) case xml.name when 'viewController' UIVIEWCONTROLLER when 'tableViewController' UITABLEVIEWCONTROLLER when 'navigationController' UINAVIGATIONCONTROLLER when 'tabBarController' UITABBARCONTROLLER when 'collectionViewController' UICOLLECTIONVIEWCONTROLLER when 'splitViewController' UISPLITVIEWCONTROLLER when 'pageViewController' UIPAGEVIEWCONTROLLER end end