Allow users to specify JUST the image without the hash (if they don't want to pass other options to the cell image attribute)

This commit is contained in:
Mark Rickert
2013-05-30 13:19:41 -04:00
parent 45b3bcade8
commit 2c962694fc

View File

@@ -86,6 +86,9 @@ module ProMotion
def set_image
if data_cell[:image]
unless data_cell[:image].is_a? Hash
data_cell[:image] = {:image => data_cell[:image]}
end
self.imageView.layer.masksToBounds = true
self.imageView.image = data_cell[:image][:image]
self.imageView.layer.cornerRadius = data_cell[:image][:radius] if data_cell[:image][:radius]