Are there strongly-typed collections in Objective-C?
In Xcode 7, Apple has introduced ‘Lightweight Generics’ to Objective-C. In Objective-C, they will generate compiler warnings if there is a type mismatch. NSArray<NSString*>* arr = @[@”str”]; NSString* string = [arr objectAtIndex:0]; NSNumber* number = [arr objectAtIndex:0]; // Warning: Incompatible pointer types initializing ‘NSNumber *’ with an expression of type ‘NSString *’ And in Swift … Read more