Search code examples
objective-cuikituibutton

Removing the image from a UIButton at runtime?


I want to remove a UIButton's image and replace it with a title at runtime. Although I am able to add the title to the UIButton, I am unable to remove the image. Does anyone have some advice?


Solution

  • Like that? [myButton setImage:nil forState:UIControlStateNormal];