Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top