0

私は EGOPhotoViewer を使用して、s3 から大量の画像をロードしています。それらは最初にテーブル ビューのサムネイルに表示されるため、ユーザーが画像の 5 行目をクリックすると、画像が 5 of 20 から画像ビューアーに読み込まれます。これはios 6でスムーズに機能しています。

しかし、ios 7をインストールしてアプリを実行すると、エラーが発生しました。クリックした画像を読み込めません。ユーザーが画像の 5 行目をクリックすると、画像ビューアーは 1/20 から始まる最初の画像を読み込みます。

私はこの多くのコードを使用しています。

  - (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バグか何かですか?

4

2 に答える 2

0

EGOphotoview ではビュー内のコントローラがメソッドを表示します

  if ([self.navigationController isToolbarHidden] && (!_popover || ([self.photoSource numberOfPhotos] > 1))) {
    [self.navigationController setToolbarHidden:NO animated:YES];
}

ios7 でこのメソッドを呼び出した後、_pageindex の値がゼロになりましたが、実際の理由はわかりませんが、1 つのアイデアを示します。indexpath.row のように、このステートメントの後に _pageindex 値を割り当てるか、割り当てたいタグ値にすることができます。

その後、物事は順調に進んでいます...楽しい...

于 2013-10-12T06:58:35.970 に答える