Saturday, 14 September 2013

How to set an invisible title on UIButton?

How to set an invisible title on UIButton?

I'm working on an Ipad application, and i need to set a title on a
'UIButton', in order to could use :
-(void)MyMethod:(id)sender
{
UIButton *resultButton = (UIButton *)sender;
if ([resultButton.currentTitle isEqualToString:@"TitleName"])
{
...
}
}
But when I use this sort of code :
[MyUibutton setTitle:@"TitleName" forState:UIControlStateNormal];
It appears "TitleName" behind the image of the 'UIButton'...
So, is it possible to fix it ?
Thanks !

No comments:

Post a Comment