Good day! The problem with UIImageView , or rather with changing tintColor through UI_APPEARANCE_SELECTOR . The color changes correctly, but if I put another picture, tintcolor is reset. Tell me what could be the problem. Thank!

 - (void)setButtonsImageColor:(UIColor *)buttonsImageColor { for (JTAlertButton *button in self.buttons) { button.imageView.image = [button.imageView.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; [button.imageView setTintColor:buttonsImageColor]; } } 
  • It is changed via UIAppearance, or via [button.imageView setTintColor:buttonsImageColor]; ? Why is it in code? - surfrider

1 answer 1

After substituting a new image, call this method again.

  • Try to write more detailed answers. Explain what is the basis of your statement? - Nicolas Chabanovsky