Reputation: 101
I am developing one iPad application using story board. In my application I have one UITableView
and one UICollectionView
. In UICollectionView
the UICollectionViewCell
contains one UIImage
and UIButton
. I am setting backgroundColor
for the UIImageView
using code based on the color coming from web api. I need to fetch the back ground color of the UIImageView
. When I click the UIButton
in the coresponding cell.
My question is: Is it possible to fetch the background color of the UIImageView
?
Upvotes: 0
Views: 91
Reputation: 1885
Use backgroundColor
property of the UIImageView
to get the color.
Upvotes: 1
Reputation: 2437
I am not sure, but you can do something like:
UIColor *clr=self.imageView.backgroundColor;
It will return a colour. try using it.
Upvotes: 2