How do you change UIButton image alpha on disabled state?

后端 未结 11 2409
庸人自扰
庸人自扰 2021-02-03 23:22

I have a UIButton with an image and on its disabled state, this image should have .3 alpha.

UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
UIIm         


        
11条回答
  •  天命终不由人
    2021-02-04 00:14

    The button’s image view. (read-only)

    @property(nonatomic, readonly, retain) UIImageView *imageView
    

    Although this property is read-only, its own properties are read/write.

提交回复
热议问题