简体   繁体   中英

Setting Alpha Value to Zero in IPhone Interface Builder Renders Button Unclickable

I am trying to make a button that is invisible but that can still be clicked. Setting the 'Hidden' property to true makes it non-clickable as does setting the alpha value to zero. Setting the alpha to.02 makes the button work, but also makes it slightly visible. Any suggestions?

Try setting the button type to Custom, this will hide the default style of the button

This is quite simple to do. Just forget about alpha parameter and use Custom instead of RoundedRect in the Button Attributes->Type.

Change it to custom or 0.01, custom makes it not visible, you could also set the alpha programatically to 0.0000000000000000000001 like this, [//outlet setAlpha://ur number];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM