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

NS_DESIGNATED_INITIALIZER expected : (colon)


  • Subject: NS_DESIGNATED_INITIALIZER expected : (colon)
  • From: Devarshi Kulshreshtha <email@hidden>
  • Date: Mon, 09 Jun 2014 17:33:19 +0530

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?
_______________________________________________

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


  • Follow-Ups:
    • Re: NS_DESIGNATED_INITIALIZER expected : (colon)
      • From: Michael Babin <email@hidden>
  • Prev by Date: Re: Conditionally allowing multiple selections in NSOutlineView
  • Next by Date: Re: NS_DESIGNATED_INITIALIZER expected : (colon)
  • Previous by thread: Re: Conditionally allowing multiple selections in NSOutlineView
  • Next by thread: Re: NS_DESIGNATED_INITIALIZER expected : (colon)
  • Index(es):
    • Date
    • Thread