<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>On Nov 29, 2016, at 1:48 AM, Tino Heth &lt;<a href="mailto:2th@gmx.de">2th@gmx.de</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=us-ascii"><div><blockquote type="cite" class=""><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Methods that need to be called when they are overridden are</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">almost always a result of poor design.</span></div></blockquote></div>Without an explanation or data to back this statement, it's hard to argue about it, and I won't make random shots.&nbsp;<div class=""><br class=""></div><div class="">But as a matter of fact, we have to deal with methods which require the behaviour in question now, and I have no idea when Cocoa will be replaced with something better.</div></div></blockquote><div><br></div>That's a great point. &nbsp;I just don't want to punish those who create methods with default implementations that are designed to be completely replaced in subclasses. &nbsp;I suppose that *could* encourage more use of protocols, but that seems like a very unfriendly way to reach a protocol-oriented utopia&nbsp;<span style="background-color: rgba(255, 255, 255, 0);">&nbsp;;-)</span><div><br><blockquote type="cite"><div><div class="">Just out of sheer curiosity:</div><div class="">What would be a better design for a method like viewWillAppear? The obvious alternative that is possible with current Swift and template methods looks really ugly to me:</div><div class="">Not only would you have to add two empty methods to each subclass of UIViewController, </div></div></blockquote><div><br></div>Why two, and why empty? &nbsp;UIViewController would supply its own empty default implementation.</div><div><br><blockquote type="cite"><div><div class="">but also rely on that those methods are only overridden once in the hierarchy of inheritance.</div></div></blockquote><br></div><div>There's no law saying you *can't* call super if you absolutely must build a two-level hierarchy below UIViewController (though there are ways around that—the main one being to avoid inheritance hierarchies). &nbsp;I just don't want to create a world where you're always expected to call super everywhere, which is what would happen if we always warn when you don't call super.</div></body></html>