Created
December 5, 2014 21:59
-
-
Save rattlion/f29daad7b97f70516737 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HomeViewController < UITabBarController | |
def loadView | |
super | |
list_view_controller = ListViewController.alloc.init | |
profile_view_controller = ProfileViewController.alloc.init | |
self.setViewControllers([list_view_controller, | |
profile_view_controller], animated:true) | |
end | |
end | |
class ProfileViewController < UIViewController | |
def loadView | |
super | |
self.title = "Profile" | |
self.view = UIView.alloc.initWithFrame(UIScreen.mainScreen.bounds) | |
self.tabBarItem = UITabBarItem.alloc.initWithTabBarSystemItem(UITabBarSystemItemContacts, tag:1) | |
end | |
def viewDidLoad | |
super | |
self.view.backgroundColor = UIColor.whiteColor | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
self.viewControllers.each { |view_controller| view_controller.view }
gets the desired effect, but feels dirty.