以下是否创建了一个强大的参考循环?我有一种感觉,这是因为我self
在回调中引用。
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
[picker dismissViewControllerAnimated:YES completion:^{
UIImage *image = [self cropImageWithInfo:info];
if (currentScreen == CurrentScreenApartment) {
[self.profileViewModel.apartmentPhotos addObject:[RuntimePhoto runtimePhotoWithImage:image]];
}
else {
[self.profileViewModel.userPhotos addObject:[RuntimePhoto runtimePhotoWithImage:image]];
}
dispatch_async(dispatch_get_main_queue(), ^{
[self reloadPhotosCell];
});
}];
}