Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7631323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:19:31+00:00 2026-05-31T06:19:31+00:00

I am using KTPhotoBrowser in order to display images parsed from a server. Also,

  • 0

I am using KTPhotoBrowser in order to display images parsed from a server.
Also, I am sharing the image by using Share kit. The sharing works fine when I am using the PhotoDataSource NSObject class in the KTPhotoBrowser.

However, if I use SDWebImageDataSource NSObject class to share the images by Share kit, it crashes when I press the action sheet button saying

Terminating app due to uncaught exception NSInvalidArgumentException, reason:

->[SDWebImageDataSource imageAtIndex:]: unrecognized selector sent to instance 0x8682e10

I am able to display the image in the scroll view.

I have used the following code in when I press the action sheet. In the KTPhotoScrollViewController class.

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

In the NSLog I got the following:

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:
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T06:19:32+00:00Added an answer on May 31, 2026 at 6:19 am

    I managed to make a “Save Image” button, the same place where you want your sharekit button by using some code from a sample that comes with KTPhotoBrowser.
    (I looked in the TabBarSample with FlickrSample)

    In SDWebImageDataSource.m I added this:

    - (UIImage *)imageWithURLString:(NSString *)string {
        NSURL *url = [NSURL URLWithString:string];
        NSData *data = [NSData dataWithContentsOfURL:url];
        UIImage *image = [UIImage imageWithData:data];
    
        return image;
    }
    
    - (UIImage *)imageSourceAtIndex:(NSInteger)index {
        NSArray *imageUrls = [images_ objectAtIndex:index];
        NSString *url = [imageUrls objectAtIndex:FULL_SIZE_INDEX];
    
        return [self imageWithURLString:url];
    }
    

    In KTPhotoBrowserDataSource.h:

    - (UIImage *)imageSourceAtIndex:(NSInteger)index;
    

    Then you can make your call like this:

    UIImage *image = [dataSource_ imageSourceAtIndex:currentIndex_];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

(Using MVC 2) From inside my controller action, I need to display the url:
i am using ktphotobrowser for my app. in big image screen (ktphotoscrollviewcontroller) when i
Using the C# Facebook SDK 5.0.3 everything works fine whit the client.Get(/me). But when
Using a CSS image sprite, I'm creating an 'interactive' image where hovering over certain
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using SQL Server 2008 R2 we are looking for a way to select the
Using Microsoft SQL Server 2005, is there any way to see when a table
Using mercurial, I've run into an odd problem where a line from one committer
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and
Using emacs on Ubuntu 11.10. I want to connect to a SQL Server database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.