Skip to content

Instantly share code, notes, and snippets.

@hartbit
Created June 30, 2011 10:46
Show Gist options
  • Select an option

  • Save hartbit/1055999 to your computer and use it in GitHub Desktop.

Select an option

Save hartbit/1055999 to your computer and use it in GitHub Desktop.
@protocol ChildProtocol;
@protocol ParentProtocol <NSObject>
@property (nonatomic, strong, readonly) id<ChildProtocol> child;
@end
@protocol ChildProtocol <NSObject>
@property (nonatomic, weak, readonly) id<ParentProtocol> parent;
@end
@class Child;
@interface Parent : NSObject <ParentProtocol>
@property (nonatomic, strong) Child* child;
@end
@interface Child : NSObject <ChildProtocol>
@property (nonatomic, weak) Parent* parent;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment