Skip to content

Instantly share code, notes, and snippets.

@Omnipresent
Created April 3, 2014 22:16
Show Gist options
  • Save Omnipresent/9963993 to your computer and use it in GitHub Desktop.
Save Omnipresent/9963993 to your computer and use it in GitHub Desktop.
class ItemCell < UITableViewCell
def rmq_build
rmq(self.contentView).tap do |q|
# Add your subviews, init stuff here
# @foo = q.append(UILabel, :foo).get
#
# Or use the built-in table cell controls, if you don't use
# these, they won't exist at runtime
# q.build(self.imageView, :cell_image)
@name = q.build(self.textLabel, :cell_label).get
@detail = q.build(self.detailTextLabel, :cell_label).get
end
end
def update(data)
# Update data here
@name.text = data[:name]
@detail.text = "test"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment