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

  • SEARCH
  • Home
  • 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 8325901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:35:25+00:00 2026-06-09T00:35:25+00:00

I keep getting the error: NSInvalidArgumentException’, reason: ‘-[UIViewController setPhotoCellName:]: unrecognized selector sent to instance

  • 0

I keep getting the error:

NSInvalidArgumentException’, reason: ‘-[UIViewController setPhotoCellName:]: unrecognized selector sent to instance

when I enter my prepare for segue call. Currently I have

TabBarController->NavigationController->TableViewController->TableViewController->ViewController

with a UI image on it.

The problem occurs when I try to segue from the second TableView controller to the ViewController. I have the segue setup from the Prototype Cell to the actual ViewController. It enters the segue and crashes. I am trying to pass an NSArray property over to the viewController to be able to use a URL in it and display the UIImage. PhotoInPlace contains the array that Im trying to pass. Here is the code.

myTableViewControllerPhotoLocation.m Code

#import "myTableViewControllerPhotoLocation.h"
#import "FlickrImageViewController.h"

@interface myTableViewControllerPhotoLocation ()
@end

@implementation myTableViewControllerPhotoLocation
@synthesize photoInPlace = _photoInPlace; //Contains NSArray to pass


-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
    if([segue.identifier isEqualToString:@"Photo Display"]){
        NSIndexPath* indexPath = [self.tableView indexPathForCell:sender];
        NSLog(@" Dicitonary = %@", [self.photoInPlace objectAtIndex:indexPath.row]); //Returns the picked cell
        NSLog(@"%@", [self.photoInPlace class]); //returns NSArray
        NSLog(@"%@", [self photoInPlace]); //Returns the array

        [segue.destinationViewController setPhotoCellName:[self.photoInPlace objectAtIndex:indexPath.row]]; 
        //Crashes HERE!
    }
}

FlickrImageViewController.h Code

@property (nonatomic, strong) NSArray* photoCellName;

FlickrImageViewController.m Code

#import "FlickrImageViewController.h"

@interface FlickrImageViewController ()
@end

@implementation FlickrImageViewController
@synthesize photoCellName = _photoCellName; //property declared in header


-(void) setPhotoCellName:(NSArray *)photoCellName{
    if(!_photoCellName)
        _photoCellName = [[NSArray alloc] initWithArray:photoCellName];
    else {
        _photoCellName = photoCellName;
    }
}
  • 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-06-09T00:35:27+00:00Added an answer on June 9, 2026 at 12:35 am

    You believe that your destination is an object from the FlickrImageViewController but the app doesn’t. Look at the class you have assigned that controller in your storyboard; according to the error, it’s a bare UIViewController.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep getting the error Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[MainViewController
For some reason I keep getting error C3861: '__typeof': identifier not found when I
I keep getting the following error: *** Terminating app due to uncaught exception 'NSInvalidArgumentException',
I'm trying to install a package that uses global-linum-mode and keep getting: error Autoloading
With the following code, I keep getting error C2535 when I compile. It's complaining
I'm trying to code some stuff for a game but I keep getting error
Keep getting this error after inserting a subdatasheet into a query and trying to
Keep getting the error Arguments are not sufficiently instantiated for the multiplication by addition
I keep getting an error saying that @android:style/Widget.Holo.Light.Button.Borderless is not public and so can't
I keep getting this error and have no idea why. I googled and scanned

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.