Last active
July 11, 2016 17:13
-
-
Save grgcombs/6bf00d095ab199edd9d0341fbe4d9412 to your computer and use it in GitHub Desktop.
Obj-C Generics Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// I borrowed pieces of this from the generics implementations in FaceBook's Bolts Framework and the Parse SDK | |
@import Foundation; | |
@class GRGCollectionItemTypeClass<__covariant CodableCollectionItem:NSObject<NSCopying,NSSecureCoding> *>; | |
@interface GRGCollectionClass<__covariant CodableCollectionItem:NSObject<NSCopying,NSSecureCoding> *> : NSObject<NSFastEnumeration> | |
typedef BOOL(^GRGNextCollectionItemBlock)(GRGCollectionItemTypeClass<CodableCollectionItem> *nextItem); | |
@property (nullable,nonatomic,copy) GRGNextCollectionItemBlock onRunNextItem; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment