Created
April 20, 2015 22:16
-
-
Save buffpojken/b24e34d086885741caa4 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 | |
context target.contentView do | |
add UIImageView, :logo | |
end | |
end | |
end | |
def cell_style | |
background_color UIColor.whiteColor | |
end | |
def logo_style | |
img = UIImage.imageNamed('channels/channel_header_logo') | |
image img | |
size [img.size.width, img.size.height] | |
constraints do | |
center_x.equals(:superview) | |
top 0 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment