选定的图像将不会在ios 7中的ego图像查看器中加载 [英] selected image wouldn't load in ego image viewer in ios 7

查看:59
本文介绍了选定的图像将不会在ios 7中的ego图像查看器中加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用EGOPhotoViewer从s3加载一堆图像.它们在表格视图中首先显示在缩略图中,因此,当用户单击图像的第5行时,它将从20的5开始将图像加载到图像查看器中.这在ios 6中运行正常.

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.

但是当我安装ios 7并运行我的应用程序时,我得到了一个错误.无法加载点击的图片.当用户单击图像的第五行时,图像查看器将加载从20个中的1个开始的第一个图像.

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];
  }

那是ios 7 ui bug还是什么?

so it is ios 7 ui bug or whatever?

推荐答案

 I got the solution of this,And it working fine For my app in IOS 7. 

              In EGOphotoviewer 


- (void)scrollViewDidScroll:(UIScrollView *)scrollView {

NSInteger _index = [self centerPhotoIndex];
if (_index >= [self.photoSource numberOfPhotos] || _index < 0) {
    return;
}

//Change here for IOS7...add "&&_index>0" after _rotating 
if (_pageIndex != _index && !_rotating && _index > 0) {

    [self setBarsHidden:NO animated:YES];
    _pageIndex = _index;
    [self setViewState];

    if (![scrollView isTracking]) {
        [self layoutScrollViewSubviews];
    }

}

}

这篇关于选定的图像将不会在ios 7中的ego图像查看器中加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆