Swift public var with default value and run didSet for that default value
<p>I have my Swift class as the simple code below:</p>

<pre><code>class FavoriteView: UIView {
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
        commonInit()
    }
    override init(frame: CGRect) {
        super.init(frame: frame)
        commonInit()
    }
    convenience init() {
        self.init(frame: CGRectZero)
    }
    private func commonInit() {
        // init something
    }

    // MY PROBLEM IS HERE
    var favoriteCount: Int = 0 {
        didSet {
            // update the view
        }
    }
}
</code></pre>

<p>The logic is whenever the <code>favoriteCount</code> is set to a new value, the code in <code>didSet</code> is run.</p>

<p>It runs well. But the problem is that code (in <code>didSet</code>) is not run for the very first time. I mean when a new <code>FavoriteView</code> instance is initialized, I assume it to run also, but it's not.</p>

<p>Is there any way to run that code (in <code>didSet</code>) for the first time.</p>

<p>Thank you!</p>