开发者

iOS: How do I create irregularly shaped / partially transparent & click-thru buttons

开发者 https://www.devze.com 2023-01-16 22:15 出处:网络
How would I create these buttons, so that clicking handles correctl开发者_如何转开发y? Each button is a .png,transparent outside of the coloured square.I need a transparent areas to be click-thru.I

How would I create these buttons, so that clicking handles correctl开发者_如何转开发y?

iOS: How do I create irregularly shaped / partially transparent & click-thru buttons

Each button is a .png, transparent outside of the coloured square. I need a transparent areas to be click-thru.


I have posted an article on how to do it here.

If you like it, please mark me up -- I currently don't have enough reputation points to do very much on this site.


On clicking the button, check the location where it is clicked. Detect the pixel alpha at that location. If alpha is 0 the disable the click else enable it. This would definitly help.

0

精彩评论

暂无评论...
验证码 换一张
取 消