cannot disable UIButton
I have UIView > UIView > Custom UIButton with a simple image.
It is a refresh button that I need to hide while I am downloading and processing the xml file, so the user is not able to trigger the refresh multiple times. This is the code I use to do that:self.myRefreshButton.enabled = NO;
self.myRefreshButton.userInteractionEnabled = NO; [self.myRefreshButton removeFromSuperview];Unfortunately, it does not work. Although the button is removed, I am able to touch and trigger the button.
Any ideas w开发者_JAVA百科hat I am doing wrong?
I'd guess you forgot to link the button the your myRefreshButton property in Interface Builder. Check your connections there.
精彩评论