das*_*ist 2 ios nsjsonserialization ios6
我目前正在阅读Pragmatic iOS 6书籍,并且无法理解第3章在关于GCD的部分中解释的以下代码行:
NSJSONSerialization *jsonResponse = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonError];
//... some code here
NSArray *tweets = (NSArray *) jsonResponse; //<-- this line
Run Code Online (Sandbox Code Playgroud)
是说该NSJSONSSerialization对象可以自动返回NSSArray的一个实例,然后存储在tweets?我检查了Apple文档,但只看到了限制使用的项目NSJSONSerialization,但没有看到它可以转换为什么对象.
谢谢!
| 归档时间: |
|
| 查看次数: |
6186 次 |
| 最近记录: |