Transparent buttons in iPhone SDK

I am trying to create a transparent button in an application for iPhone - to create an Easter egg. How can I set up a transparent button without touching the alpha (when alpha = 0.0 on UIButton, it no longer responds to touch)?

Thank.:)

+3
source share
3 answers

You can set alpha to a very small value.

Or you can create a clean, clean UIImage and use a custom button style and set it to the button image.

+2
source

Set the type of your button to UIButtonTypeCustom and it will not have a style. (thus, it must be "invisible").

+14

var btnTest = Ti.UI.createButton({
    backgroundImage: 'sample.png',
    height: 24,
    width: 20,
    top:  10,
    left:10
});
-1

Source: https://habr.com/ru/post/1732117/


All Articles