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
?
I am not sure, but you can do something like:
UIColor *clr=self.imageView.backgroundColor;
It will return a colour. try using it.
使用UIImageView
backgroundColor
属性获取颜色。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.