What are the details of “Objective-C Literals” mentioned in the Xcode 4.4 release notes?

问题:

I was going through the release notes for Xcode 4.4 and noticed this:我正在浏览 Xcode 4.4 的发行说明并注意到这一点:

LLVM 4.0 Compiler LLVM 4.0 编译器

Xcode now includes the Apple LLVM Compiler version 4.0, including the following newObjective-C language features: [...] Xcode 现在包含 Apple LLVM 编译器 4.0 版,包括以下新的Objective-C 语言特性:[...]
- Objective-C literals: create literals for NSArray, NSDictionary, and NSNumber, just the same as the literals for NSString - Objective-C 文字:为 NSArray、NSDictionary 和 NSNumber 创建文字,与 NSString 的文字相同

I'm intrigued about this feature.我对这个功能很感兴趣。 It's not entirely clear to me just how literals for NSString work and how one could use them on NSArray , NSDictionary , and NSNumber .我并不完全清楚NSString文字是如何工作的,以及如何在NSArrayNSDictionaryNSNumber上使用它们。

What are the details?详情是什么?


解决方案:

参考一: https://en.stackoom.com/question/dDli
参考二: https://stackoom.com/question/dDli
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章