Post

Replies

Boosts

Views

Activity

Comment on 'height' is inaccessible due to 'internal' protection level error
This is the code for Color.Swift import UIKit class Color: UIViewController {        public struct Color {      public var r, g, b, a: UInt8            public init(r: UInt8, g: UInt8, b: UInt8, a: UInt8 = 255)      {        self.r = r        self.g = g        self.b = b        self.a = a      }    }    override func viewDidLoad() {      super.viewDidLoad()      // Do any additional setup after loading the view.    }        /*    // MARK: - Navigation    // In a storyboard-based application, you will often want to do a little preparation before navigation    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {      // Get the new view controller using segue.destination.      // Pass the selected object to the new view controller.    }    */ } extension Color {    static let clear = Color(r: 0, g: 0, b: 0, a: 0)    static let black = Color(r: 0, g: 0, b: 0)    static let white = Color(r: 255, g: 255, b: 255)    static let gray = Color(r: 192, g: 192, b: 192)    static let red = Color(r: 255, g: 0, b: 0)    static let green = Color(r: 0, g: 255, b: 0)    static let blue = Color(r: 0, g: 0, b: 255) }
Jun ’21