私はサーバーから解析された画像を表示するためにKTPhotoBrowser
を使用しています。 また、共有キットを使用して画像を共有しています。 KTPhotoBrowser
でPhotoDataSource
NSObject
クラスを使用している場合、共有は正常に機能します。SDWebImageDataSource in KTPhotoBrowser --iPhone
:私は共有キットにより、画像を共有するSDWebImageDataSource
NSObject
クラスを使用する場合、私はアプリを終了
言っアクションシートボタンを押したときに
はしかし、それがキャッチされない例外によりNSInvalidArgumentException、理由にクラッシュします
->[SDWebImageDataSource imageAtIndex:]: unrecognized selector sent to instance 0x8682e10
私はスクロールビューで画像を表示することができます。
私はアクションシートを押したときに次のコードを使用しました。 KTPhotoScrollViewController
クラス。 NSLogで
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == actionSheet.cancelButtonIndex) return;
NSDictionary *table = [[NSDictionary alloc] initWithObjectsAndKeys:@"SHKTwitter", @"Twitter", @"SHKFacebook", @"Facebook", @"SHKMail", SHKLocalizedString(@"Email", nil), nil];
NSString *sharersName = [actionSheet buttonTitleAtIndex:buttonIndex];
Class SharersClass = NSClassFromString([table objectForKey:sharersName]);
[table release];
NSLog(@"dataaaasrc-- %@",dataSource_);
UIImage *image = [dataSource_ imageAtIndex:currentIndex_];
SHKItem *item = [SHKItem image:image title:@"Look at this picture!"];
[SharersClass performSelector:@selector(shareItem:) withObject:item];
}
私は次のように得た:
dataaaasrc--SDWebImageDataSource: 0x8682e10 //betwn lessthan and greater than symbols
-[SDWebImageDataSource imageAtIndex:]: unrecognized selector sent to instance 0x8682e10
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[SDWebImageDataSource imageAtIndex:]: unrecognized selector sent to instance 0x8682e10'
*** First throw call stack: