Skip to content

joexi/OCGeneric

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

OCGeneric

Basis Generic Support in Objective-C.

  • Including OCGenerics.h

  • Register the class you want to use in NSArray

    GENERIC(NSString)
    GENERIC(NSNumber)
  • Declaring a faked NSMuatbleArray like this
    NSMutableArray(NSString) *strAry = [[NSMutableArray(NSString) alloc] init];
    NSMutableArray(NSNumber) *numberAry = [[NSMutableArray(NSNumber) alloc] init];
  • Type Recognize

    The Xcode will figure out the wrong type when you want to add a NSNumber object into an NSString Array

2014-04-16 4 52 40

  • Extensions

    You can make some extentions based on this by adding more functions into OCGenerics.h

About

Basis Generic Support in Objective-C.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published