Skip to content

Instantly share code, notes, and snippets.

@dodikk
Created December 9, 2013 10:28
Show Gist options
  • Save dodikk/7870197 to your computer and use it in GitHub Desktop.
Save dodikk/7870197 to your computer and use it in GitHub Desktop.
Correct Include style for objective-c
#import "LineReader.h" // required to conform protocol LineReader
#import <Foundation/Foundation.h> // required to inherit NSObject
#include "MyPureCStruct.h" // required to declare plainOldData
#include "MyBlockTypedefs.h" // required to include custom blocks
@class MyOtherClass; // do not use #import
@protocol MyOtherProtocol; // do not use #import
@interface WindowsLineReader : NSObject< LineReader >
{
@public
MyPureCStruct plainOldData;
}
@property ( nonatomic ) MyOtherClass* classVar ;
@property ( nonatomic ) id<MyOtherProtocol> protocolVar ;
@property ( nonatomic, copy ) MyCustomBlock block;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment