I had this problem before, but I managed to get around this so far. Basically, I create a UIbutton user interface, setting its image as uiimage, and then the button that had the label on until I applied the code below it loses its label. I need this label because it is set programmatically in the following code.
NSString *imageName = [NSString stringWithFormat:kNameOfButtonimage ];
UIImage *image = [UIImage imageNamed:imageName];
[button setImage:image forState:UIControlStateNormal ];
Any help you could provide would be greatly appreciated.
-nick
source
share