mirror of
https://github.com/zhigang1992/ProMotion.git
synced 2026-06-01 02:10:22 +08:00
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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user