当我从UITableView
中的tablecells中删除图像时,它用于从tablecells和server中删除,但是当我们点击打开egophotoviewer中的另一个图像时,删除的图像仍然会出现?..
这是我的代码。
- (void)showSelectedPhoto:(NSIndexPath *)indexPath {
NSString *passingImageName = [[self.tableDataSource objectAtIndex:indexPath.row]objectForKey:@"fileName"];
NSMutableArray *photoArray = [self getFilteredArray];
NSMutableArray *urlsArray = [[NSMutableArray alloc] init];
for (NSString *string in photoArray) {
NSLog(@"String Values:%@", string);
NSURL *imageUrl = [self getEnlargedImageImageUrl:[self._prefix stringByAppendingString:string]];
NSLog(@"Passing url is:%@", imageUrl);
photo = [[EGOQuickPhoto alloc] initWithImageURL:imageUrl name:string];
[urlsArray addObject:photo];
}
if (!source) {
self.source = [[EGOQuickPhotoSource alloc] initWithPhotos:urlsArray];
}
photoController = [[EGOPhotoViewController alloc] initWithPhotoSource:source];
[self.navigationController pushViewController:photoController animated:YES];
NSUInteger index = [photoArray indexOfObject:passingImageName];
[photoController moveToPhotoAtIndex:index animated:NO];
}
答案 0 :(得分:0)
删除图像后,您需要重新加载tableview。
[tableView reloadData];