Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Moon013

macrumors newbie
Original poster
Jul 14, 2008
23
0
Hi,
I am currently working on a button (a UIButton type provided in Interface builder), which will turns to be "unclickable" after clicked for the first time. I expect the button to change color, informing the user that the button cannot be clicked anymore.

Is there a way to do it? I have gone through the UIButton header file and can't seem to find a way to make that happen...

In addition, I wanted to change the text too. The UIButton provides a variable called *_titleView. But it seems it is not the one that changes the text.
 
Can you not simply do:
Code:
[button setEnabled:NO];

I haven't tried it on the device yet, but it works in the simulator.
 
I had written that line of code and is being put into a function which is triggered only when the button is clicked. So by right, when clicked, function triggered, the button should be made unclickable, but still it doesn't work...
 
Oops, I didn't link my button...Now it works!

So sorry about it and as well thanks.:)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.