We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
e.g. in .m: NSString* const kDate = @"kDate"; NSString* const kSubject = @"kSubject"; NSString* const kAlarmOffset = @"kAlarmOffset";
should produce in .h: extern NSString* const kDate; extern NSString* const kSubject; extern NSString* const kAlarmOffset;
The text was updated successfully, but these errors were encountered:
implementation proposal:
in file-level annotation, introduce a new section 'constants' in MyClass.m: /*@ #import xxx ...
state: ... constants: NSString* kMyMagicString = @"hoho" NSString* kMyMagicStringWithDefault = "kMyMagicStringWithDefault" ... */ @implementation MyClass
Let this generate the header MyClass.h: @interface MyClass : NSObject { ... } @EnD
// (OCHGEN) constants from class-level annotation extern NSString const kMyMagicString; extern NSString const kMyMagicStringWithDefault; // (OCHGEN) constant implementation #ifndef CONSTANTS_MyClass NSString* const kMyMagicString = @"hoho"; NSString* const kMyMagicStringWithDefault = @"kMyMagicStringWithDefault"; #define CONSTANTS_MyClass #endif
Sorry, something went wrong.
No branches or pull requests
e.g. in .m:
NSString* const kDate = @"kDate";
NSString* const kSubject = @"kSubject";
NSString* const kAlarmOffset = @"kAlarmOffset";
should produce in .h:
extern NSString* const kDate;
extern NSString* const kSubject;
extern NSString* const kAlarmOffset;
The text was updated successfully, but these errors were encountered: