Transparency iOS6 / iOS 7 UIView

So, I have a game application, it has an answer screen. The response screen has 0.9 alpha, and the answer button has 1.0f. You can see in the screenshot.

iOS 6

Same thing on iOS 7

iOS 7

The alpha button is still 1.0, but it looks transparent. If I do a background view of alpha 1.0, it works on iOS 7, but I really need a user to see the background under the view.

Please, help.

+6
source share
1 answer

for a view that is translucent, sets alpha as follows:

UIView *view.backgroundColor=[[UIColor whiteColor] colorWithAlphaComponent:.6]; 

not

 UIView *view.backgroundColor=[UIColor whiteColor]; view.alpha=.6; 
+17
source

Source: https://habr.com/ru/post/957597/


All Articles