What are the main properties of UIView?

Beginner

Answer

Key UIView properties include:

  • frame: Position and size in superview's coordinate system
  • bounds: Internal coordinate system (always origin at 0,0)
  • center: Center point in superview coordinates
  • backgroundColor: Background color of the view
  • alpha: Transparency level (0.0 to 1.0)
  • isHidden: Visibility state
  • tag: Integer identifier for finding views
  • superview: Parent view reference
  • subviews: Array of child views