• 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: NS_DESIGNATED_INITIALIZER expected : (colon)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NS_DESIGNATED_INITIALIZER expected : (colon)


  • Subject: Re: NS_DESIGNATED_INITIALIZER expected : (colon)
  • From: Michael Babin <email@hidden>
  • Date: Mon, 09 Jun 2014 07:28:48 -0500

On Jun 9, 2014, at 7:03 AM, Devarshi Kulshreshtha <email@hidden> wrote:

> I am trying to declare a designated initializer like this:
>
> - (instancetype)initWithDelegate:(id <MyDelegate>)delegate
> NS_DESIGNATED_INITIALIZER;
>
> But it is showing me this compilation error:
>
> Expected ':'
>
> Interestingly when I try to write it like this (reference link:
> https://developer.apple.com/library/prerelease/ios/releasenotes/ObjectiveC/ModernizationObjC/AdoptingModernObjective-C/AdoptingModernObjective-C.html)
> -
>
> - (instancetype)init NS_DESIGNATED_INITIALIZER;
>
> It shows this error:
>
> Expected ';' after method prototype.
>
> Any ideas on how to properly use NS_DESIGNATED_INITIALIZER?

The usage in the declaration you provided looks correct. What does it look like when you preprocess the .m file (Product > Perform Action > Preprocess)?



_______________________________________________

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: 
 >NS_DESIGNATED_INITIALIZER expected : (colon) (From: Devarshi Kulshreshtha <email@hidden>)

  • Prev by Date: NS_DESIGNATED_INITIALIZER expected : (colon)
  • Next by Date: Stupid bindings!%#$% :)
  • Previous by thread: NS_DESIGNATED_INITIALIZER expected : (colon)
  • Next by thread: Stupid bindings!%#$% :)
  • Index(es):
    • Date
    • Thread