• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Why is overriding unavailable designated initializer of super required?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is overriding unavailable designated initializer of super required?


  • Subject: Re: Why is overriding unavailable designated initializer of super required?
  • From: Alex Zavatone <email@hidden>
  • Date: Mon, 10 Aug 2015 16:32:49 -0400

On Aug 10, 2015, at 4:27 PM, Seth Willits wrote:

>
> I've yet to understand this:
> https://gist.github.com/swillits/3133e114f770947b3cf6
>
>
> If a subclass says that its superclass's designated initializer is unavailable (IOW, the subclass's designated initializer must be used), why does the compiler produce a warning that the superclass's designated initializer must be overridden in the subclass?
>
> If the subclass is going to call super's designated initializer via [super init....] then this subclass override would never get called anyway...
>
> What am I missing?

Is it that it's overridden in the subclass and the subclass then calls the initializer in super?  Is it just making sure that the subclass is called first, then that calls the superclass initializer, then when that finishes, the rest of the subclass's initializer code gets called?

Alex Zavatone
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Why is overriding unavailable designated initializer of super required? (From: Seth Willits <email@hidden>)

  • Prev by Date: Why is overriding unavailable designated initializer of super required?
  • Next by Date: Re: Why is overriding unavailable designated initializer of super required?
  • Previous by thread: Why is overriding unavailable designated initializer of super required?
  • Next by thread: Re: Why is overriding unavailable designated initializer of super required?
  • Index(es):
    • Date
    • Thread