I am using EGOPhotoViewer to load up a bunch of images from the s3. They are shown in thumbnails first in table view, so when a user clicks 5th row of image, it loaded the image into image viewer starting at 5 of 20 . and this is working smoothly in ios 6.
but when I installed ios 7 and run my app.I got an error. it fails to load the clicked image. when user click 5th row of image,image viewer load the very 1st image starting at 1 of 20.
i am using this much of code.
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{ ......
[self showSelectedPhoto:indexPath];
......
}
//load the selected image
-(void)showSelectedPhoto:(NSIndexPath *)indexPath
{
[UserInfo sharedInfo].Path=indexPath;
NSLog(@"%@",indexPath);
NSString *passingImageName=[[self.tableDataSource objectAtIndex:indexPath.row]objectForKey:@"fileName"];
NSMutableArray *photoArray=[self getFilteredArray];
NSMutableArray *urlsArray=[[NSMutableArray alloc] init];
// [self.tableView reloadData];
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];
}
self.source=[[EGOQuickPhotoSource alloc]initWithPhotos:urlsArray];
photoController = [[EGOPhotoViewController alloc] initWithPhotoSource:source];
[self.navigationController pushViewController:photoController animated:YES];
NSUInteger index = [photoArray indexOfObject:passingImageName];
NSLog(@"index = %lu",(unsigned long)index);
[photoController moveToPhotoAtIndex:index animated:NO];
}
so it is ios 7 ui bug or whatever?
}
In EGOphotoviewcontroller in viewwillappear method
After calling this method in ios7 _pageindex value getting zero,i don't know the actual reason for this, but i will give one idea. just assign _pageindex value after this statement,like indexpath.row or may be tag value what youwant to assign,
Then the things are going good... njoy...