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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章