Objective C语法帮助 - 文字

时间:2013-03-28 07:49:03

标签: objective-c syntax literals

需要以下objective-c语法的帮助:

[error.userInfo[FBErrorParsedJSONResponseKey][@"body"][@"error"][@"type"] isEqualToString:@"OAuthException"]

这是怎么回事?如何使用正文,错误和类型文字?

这是完整的块调用:

[request startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
    if (!error) {
        // handle successful response
    } else if ([error.userInfo[FBErrorParsedJSONResponseKey][@"body"][@"error"][@"type"] isEqualToString:@"OAuthException"]) { 
        NSLog(@"The facebook session was invalidated");
        [self logoutButtonTouchHandler:nil];
    } else {
        NSLog(@"Some other error: %@", error);
    }
}];

我也看过类似

的语法
self.userProfile = [PFUser currentUser][@"profile"];

其中userProfileNSDictionary[PFUser currentUser]返回PFUser[PFUser][@"profile]如何初始化字典?

0 个答案:

没有答案