On Jun 9, 2014, at 7:03 AM, Devarshi Kulshreshtha <devarshi.bluec...@gmail.com> 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 (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com