Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/103.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 使用FGallery图像查看器_Objective C_Ios_Ipad - Fatal编程技术网

Objective c 使用FGallery图像查看器

Objective c 使用FGallery图像查看器,objective-c,ios,ipad,Objective C,Ios,Ipad,我正在尝试实现FGallery imageviewer。我有一个方法,它给了我一个我想要显示的所有照片URL的数组。接下来,我将实现以下FGallery方法 - (int)numberOfPhotosForPhotoGallery:(FGalleryViewController *)gallery { return [_picturesForAlbum count]; } - (FGalleryPhotoSourceType)photoGallery:(FGalleryViewCo

我正在尝试实现FGallery imageviewer。我有一个方法,它给了我一个我想要显示的所有照片URL的数组。接下来,我将实现以下FGallery方法

- (int)numberOfPhotosForPhotoGallery:(FGalleryViewController *)gallery
{
     return [_picturesForAlbum count];

}

- (FGalleryPhotoSourceType)photoGallery:(FGalleryViewController *)gallery sourceTypeForPhotoAtIndex:(NSUInteger)index
{
     return FGalleryPhotoSourceTypeNetwork;
}


- (NSString*)photoGallery:(FGalleryViewController *)gallery urlForPhotoSize:(FGalleryPhotoSize)size atIndex:(NSUInteger)index {
    return [_picturesForAlbum objectAtIndex:index];
}
在我的DidSelectRowForIndexath中,我做到了这一点

networkGallery = [[FGalleryViewController alloc] initWithPhotoSource:self.picturesForAlbum];
        [self.navigationController pushViewController:networkGallery animated:YES];
但是我不知道我应该在initWithPhotoSource中放什么。当我有这样的时候。我一直得到以下错误

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM numberOfPhotosForPhotoGallery:]: unrecognized selector sent to instance 0xc95bb60'
有人能帮我吗


谢谢各位代表,即self。它将调用委托方法。 [[FGalleryViewController alloc]initWithPhotoSource:self]