It shows "required initializer init must be provided in subclass of UIControl" When I override init(frame: CGRect)
<p>This code works:</p>

<pre><code>import UIKit

class wheel: UIControl {

}
</code></pre>

<p>But this code doesn't:</p>

<pre><code>class wheel: UIControl {
override init(frame: CGRect) {
    super.init(frame: frame)
}
</code></pre>

<p>It shows error "<em>required initializer init must be provided in <strong>subclass</strong> of <code>UIControl</code></em>" when I override init(frame: CGRect) but not <code>init(coder aDecoder: NSCoder)</code>.</p>

<p>Why do I have to implement <code>init(coder aDecoder: NSCoder)</code>? And why don't I need to implement it if I didn't implement <code>init(frame: CGRect)</code>?</p>

<p>I found a similar Stack Overflow post but it didn't explain:
<a href="https://stackoverflow.com/questions/35255466/swift-error-required-initializer-initcoder-must-be-provided-by-subclas">Swift : Error: &#39;required&#39; initializer &#39;init(coder:)&#39; must be provided by subclass of &#39;UIView&#39;</a></p>