Created
April 20, 2015 20:18
-
-
Save buffpojken/ef11cd3c5baf38175503 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 ChannelListHeaderLayout < MotionKit::Layout | |
def layout | |
root :cell do | |
add UIImageView, :logo | |
end | |
end | |
def cell_style | |
background_color UIColor.whiteColor | |
end | |
def logo_style | |
NSLog("ninja") | |
img = UIImage.imageNamed('channels/channel_header_logo') | |
frame from_top(size: [img.size.width, img.size.height]) | |
image img | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Probably need an
autoresizingMask
in there, so that it stays centered.