Warrior
Warrior

Reputation: 39374

How to create a translucent button in iphone?

I am new to iphone development.I want to create a translucent button with the text "exit".How can i create it? Thanks.

Upvotes: 0

Views: 1259

Answers (3)

Joseph Beckenbach
Joseph Beckenbach

Reputation: 91

You can also use Interface Builder and not have to fiddle with PNG transparency.

On the "Attributes" pane for that "custom"-type button, the "View" subpane has an "Alpha" slider. Set that to (for example) 0.50 to make it translucent. Set the "Title" in the configuration to "exit". Done.

Upvotes: 1

Dave Everitt
Dave Everitt

Reputation: 17856

the .png format supports alpha transparency (which you can set in the graphics app you use to make the button). For more info on iPhone graphics, see the iPhone OS ref.

Upvotes: 0

Jim
Jim

Reputation: 4719

Please create .png image with Translucent effect and "exit" text on that image.

Once you have image ready create Custom UIButton and set image for that button.

Thanks,
Jim.

Upvotes: 0

Related Questions