如何安装在https://github.com/enormego/PhotoViewer找到的PhotoViewer?我已经下载了它,只是不知道该在我的应用程序中放入什么。

最佳答案

将“ EGOCache”和“ EGOImageLoader”文件夹从演示项目拖放到项目中。将“ MessageUI.framework”添加到项目中。

然后您可以在演示中使用以下代码(而不是MyPhoto和MyPhotoSource类,我们应该使用EGOQuickPhoto和EGOQuickPhotoSource)。

        EGOQuickPhoto *photo = [[EGOQuickPhoto alloc] initWithImageURL:[NSURL URLWithString:@"http://a3.twimg.com/profile_images/66601193/cactus.jpg"] name:@" laksd;lkas;dlkaslkd ;a"];
        EGOQuickPhoto *photo2 = [[EGOQuickPhoto alloc] initWithImageURL:[NSURL URLWithString:@"https://s3.amazonaws.com/twitter_production/profile_images/425948730/DF-Star-Logo.png"] name:@"lskdjf lksjdhfk jsdfh ksjdhf sjdhf ksjdhf ksdjfh ksdjh skdjfh skdfjh "];
        EGOQuickPhotoSource *source = [[EGOQuickPhotoSource alloc] initWithPhotos:[NSArray arrayWithObjects:photo, photo2, photo, photo2, photo, photo2, photo, photo2, nil]];

        EGOPhotoViewController *photoController = [[EGOPhotoViewController alloc] initWithPhotoSource:source];
        [self.navigationController pushViewController:photoController animated:YES];

        [photoController release];
        [photo release];
        [photo2 release];
        [source release];

08-18 17:02