How can I make part of a UIView transparent without subclassing? Or is subclassing a must? THanks!
How can I make part of a UIView transparent without subclassing? Or is subclassing
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Depends on which part of the view is to be transparent.
If it is going to be half of a view or something like that, you can set the background color of the entire view to clearColor. And then add a normal view (with white background) on the area which would not be transparent.
Another thing what you can do is, create an Image which is partially transparent. Set the color of the
UIViewtoclearColor. Add the image (UIImageView) as the background of the view.