Sha256: 2f6fdbfd2149c13406146c9d8035ca59201d4e9f9c780e362a7a871332dc012d
Contents?: true
Size: 588 Bytes
Versions: 8
Compression:
Stored size: 588 Bytes
Contents
module ProMotion class TableViewCell < UITableViewCell include TableViewCellModule attr_accessor :image_size # TODO: Is this necessary? def layoutSubviews super if self.image_size && self.imageView.image && self.imageView.image.size && self.imageView.image.size.width > 0 f = self.imageView.frame size_inset_x = (self.imageView.size.width - self.image_size) / 2 size_inset_y = (self.imageView.size.height - self.image_size) / 2 self.imageView.frame = CGRectInset(f, size_inset_x, size_inset_y) end end end end
Version data entries
8 entries across 8 versions & 1 rubygems