Showing posts with label opacity. Show all posts
Showing posts with label opacity. Show all posts

Saturday, December 10, 2016

Part 7 - UIView's Background Color Property


  • Gives the UIView a color
  • You can animate the color change
  • Property in code is called backgroundColor
  • You can set the Background color to an image:
     
    view.backgroundColor = UIColor(patternImage: UIImage(named: "myImage")!)
     
    

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.

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...