Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone - Buttons background image

Tags:

button

iphone

I've added some buttons to my app with a background image (RESET button below), but the corners are quite as expected. See below:

alt text

The bottom left and right corners of the RESET button seem to be squared. My original image has rounded corners.

Anyone come across this problem before ?

like image 303
Stephen Avatar asked Sep 03 '10 08:09

Stephen


2 Answers

There's nothing tricky about changing the image for a button(I did it lots of times), as long as you follow a couple of simple steps:

  1. your button image must have a transparent background
  2. your button must be set as Custom (and NOT Round Rect)
  3. your button's background color must have Opacity=0

In order to change the button background color, when you change the color make sure you click on the left side of the color combobox, so that you get presented the color picker. There, you'll have to change the Opacity to 0.

See the image below for a simple demo. alt text

Good luck with your button

like image 162
Alex Avatar answered Oct 01 '22 11:10

Alex


Chek out the the bottom corners of the reset button are rounded and transparent. also set the backcolor of the button as clearcolor. and make the button custom instead of roundedrect.

I suppose the bottom corners of the buton are not transparent so you are facing the problem.

hAPPY cODING...

like image 31
Suresh Varma Avatar answered Oct 01 '22 12:10

Suresh Varma