Saturday, December 10, 2016

Part 6 - UIView's Alpha Property

  • Changes the transparency (ability to see through) a UIView.
  • 0 = Completely invisible
  • 1 = Completely solid (opaque)
  • Alpha affects the transparency of all subviews
  • You can animate this property
  • On a label, the alpha property affects the text
  • On a button, the alpha property also affects the text
  • If you want to preserve Alpha on text (make opaque) and make the rest partially transparent then set the Opacity of the Background Color
  • Changing the Alpha property of a view does not affect its parent view's Alpha
  • If Alpha is less than 1 then you should uncheck the Opaque property (set to false)
  • If Alpha is set to zero, the control no longer accepts inputs or touches. For example, a UIButton that has it's Alpha set to zero can no longer be clicked.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

SwiftUI Search & Filter with Combine - Part 3 (iOS, Xcode 13, SwiftUI, 2...

In part 3 of the Searchable video series, I show you how to use Combine in #SwiftUI for the search and filter logic connected to the searcha...