Nobody's put this up here yet, so I'll do it!
Tthis is now officially supported in Objective-C. As of Xcode 7, you can use the following syntax:
NSArray<MyClass *> *myArray = @[[MyClass new], [MyClass new]];
Note
It's important to note that these are compiler warnings only and you can technically still insert any object into your array. There are scripts available that turn all warnings into errors which would prevent building.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…