changing the color of image in iphone sdk

前端 未结 5 859
花落未央
花落未央 2020-12-29 01:06

I have a image & i want to change the color of that image through programatically.

\"enter

5条回答
  •  青春惊慌失措
    2020-12-29 01:33

    You can try Ankish Jain's answer, it works for me.

    theImageView.image = [theImageView.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
    [theImageView setTintColor:[UIColor redColor]];
    

提交回复
热议问题