views:

421

answers:

1

as i am a new in iphone world ,i need some startup help to achieve this kind of design? background of view which has button should be transparent so that user can see product image in back.

http://www.freeimagehosting.net/uploads/cb58b72480.jpg

let me know if it requires more explanation? thanks.

+1  A: 

You will have to have a single UIView containing your UIImageView and UIButton.

Using InterfaceBuilder first drag the UIImageView and then drag the UIButton inside the parent UIVIew.

Or programmatically you can call the parent UIView's addSubView method first for the UIImageView and then for the UIButton view

[view addSubview:myImageView]
[view addSubview:myButton]

Either of this approach will place the instance UIButton on top of the UIImageView when the UIView is rendered

Also, FYI, transparency of a View can be controlled through its alpha property

alpha = 0 being the most transparent and alpha = 1 being the most opaque

Hope this helps.

Mihir Mathuria
that works really well thanks , but how do i make border around(red border in the image) ,it should feel like button view is placed over that image, may be i will add few labels around it.
Nnp
You will need such an image (transparent background with red border). Once you have such an image you can put this new image and the button in its own subview
Mihir Mathuria