Skip to content

Instantly share code, notes, and snippets.

@GantMan
Created April 24, 2013 20:11
Show Gist options
  • Save GantMan/5455175 to your computer and use it in GitHub Desktop.
Save GantMan/5455175 to your computer and use it in GitHub Desktop.
Mixing Awesome-Motion with Teacup and other insanity for Blog post. http://iconoclastlabs.com/cms/blog/posts/motion-awesome-amazing-icons-in-your-app
class RootController < UIViewController
include MotionAwesome
def layoutDidLoad
# Custom Navigation Title
@mine = label( :beer, text: "Get Crunk" ) do |label|
label.backgroundColor = UIColor.clearColor
label.sizeToFit
self.navigationItem.titleView = label
end
end
# ... normal stuffs leading up to layout block
layout :settings do
#regular
@label = subview(UILabel, :label)
#awesome label
@twitter = subview(MotionAwesome.label(:twitter, text: '@IconoclastLabs'), :twitter_label)
#awesome button
@site_button = subview(MotionAwesome.button(:beaker, text: 'Iconoclast Labs Website'), :site_button)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment