Skip to content

Instantly share code, notes, and snippets.

@buffpojken
Created April 20, 2015 20:18
Show Gist options
  • Save buffpojken/ef11cd3c5baf38175503 to your computer and use it in GitHub Desktop.
Save buffpojken/ef11cd3c5baf38175503 to your computer and use it in GitHub Desktop.
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
@colinta
Copy link

colinta commented May 29, 2015

Probably need an autoresizingMask in there, so that it stays centered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment