Overriding properties in swift
问题 For example a have a first class public class MyBaseButton: UIButton { public var weight: Double = 1.0 public var text: String? { get { return self.titleForState(.Normal) } set { return self.setTitle(newValue, forState: .Normal) } } } And inherited class: public class SomeButton: SomeBaseButton { override public var text: String? = "text" override public var weight: Double = 2.0 } So, the logic is that SomeClass define own text and weight. But I'm getting an errors: For text : " Cannot