Created
September 2, 2012 07:27
-
-
Save michael-erasmus/3595583 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 MyViewController < UIViewController | |
include ViewTags | |
#by convention, these views will have tags that correspond to the order you specify them in | |
# :date_label:1, :name_label:2 | |
has_view :date_label, :name_label | |
def loadView | |
views = NSBundle.mainBundle.loadNibNamed "myview", owner:self, options:nil | |
self.view = views[0] | |
end | |
def viewDidLoad | |
@date_label = get_view(:date_label) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry I only saw your comment now.
You probably need to setup compiler dependencies between your calculate_view_controller.rb file and the view_tags.rb file. By default RM will just compile them alphabetically. You can either do this manually in your Rakefile:
Or you can use my solution do do this automatically:
https://gist.github.com/3698332