問題タブ [completion-block]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
objective-c - ネストされた completionBlock が objc と呼ばれない
これは私のネストされたブロックです。見てください:
問題はこの- (void)initializeDictionary:(NSDictionary *)dictionary completionBlock:(void (^)(YoutubeVideo *))
completionBlock {
}
ブロックにあり、以下のブロックがあります
[self getChannelProfilePictureForChannelID:youtubeVideo.channelID completionBlock:^(NSMutableArray *channelList) {
NSLog(@"[channelList objectAtIndex:0] %@", [channelList objectAtIndex:0]);
youtubeVideo.channelProfileImageURL = [channelList objectAtIndex:0];
}];
ブロックが値を返すときに、これらのコード行が実行されていない場所NSSting
。
残りのコードを実行した後に呼び出されます。
そのため、オブジェクト モデルに値が挿入されません。提案をお願いします。前もって感謝します。
良い一日を過ごしてください。