我有以下代码:
[GetUserData getUserDataWithBlock:^(UserData *userData, NSError *error)
{
self.userData = userData;
#1 self.userData.fbUser = user;
// Call REST API of server 'GetAllWords'
[GetAllWords getAllWordsWithBlock:^(NSSet *newWords, NSError *error)
{
[self saveAllWords:newWords];
#2 [self showRootView];
}];
}];
问题是,它self.userData
在#1 中正确设置(并且不为空),但是当我到达#2 时 -self.userData
变为空...... Point #1 是我设置的唯一位置self.userData
。