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 8317881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:45:29+00:00 2026-06-08T21:45:29+00:00

UI Pickers got me stuck again, Im still learning with the UI picker so

  • 0

UI Pickers got me stuck again, Im still learning with the UI picker so not sure if ive done something fundamentally wrong here.

Trying to display an image from row UIPicker.

Error:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString _isResizable]: unrecognized selector sent to instance 0x70fc'
*** First throw call stack:

Heres the code:

#import "Imagepick.h"

@interface Imagepick ()

@end

@implementation Imagepick
 @synthesize select;
@synthesize imageview;


- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
    // Custom initialization
}
return self;
}

- (void)viewDidLoad
{


   ////arrays & objects
   arrStatus = [[NSArray alloc] initWithObjects:@"pic1",@"pic2",nil];




}
-(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView
{
//One column
return 1;
}

-(NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:   (NSInteger)component
 {

return arrStatus.count;


 }

-(NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row    forComponent:(NSInteger)component
 {

  return [arrStatus objectAtIndex:row];

 }
 - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component

{

 [imageview setImage:[arrStatus objectAtIndex:row]]; UIImage *pic1 = [[UIImage alloc]  initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"appstorelogo" ofType:@"png"]];

  [imageview setImage:[arrStatus objectAtIndex:row]]; UIImage *pic2 = [[UIImage alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"applogo" ofType:@"png"]];

 }



 - (void)viewDidUnload
{
[self setImageview:nil];
[self select:nil];
[super viewDidUnload];
// Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end

* unused variable warning for pic1 & pic2 if relevant?

  • 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-08T21:45:32+00:00Added an answer on June 8, 2026 at 9:45 pm

    Your problem is [imageview setImage:[arrStatus objectAtIndex:row]]; You are trying to setImage with strings.

    You are also not using pic1, and pic2.

    What you might want to do is set the imagenames as the array like:

    arrStatus = [[NSArray alloc] initWithObjects:@"appstorelogo",@"applogo",nil];
    

    and then set the images like

    - (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
    {
        UIImage *img = [[UIImage alloc]  initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:[arrStatus objectAtIndex:row] ofType:@"png"]];
    
        [imageview setImage:img]; 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a webapp for iPad and i got stuck on something that should
i've got a date-range picker, with 2 field each date picker: dat_start and date_end;
Hello I've been expirimenting with the Google Picker API (http://code.google.com/apis/picker/). I've got a working
I have a picker that saves my image in NSDocumentDirectory , here: for (int
I want to use the scrollview as something like a picker in horizontal mode.
OK, well, this has got to be something really dumb. I've got a little
I sure do love jQuery. It has some great date pickers available for it.
Not actually sure how to phrase my question. I'm using jqgrid in most of
I am kinda in a bind. I got this color picker plugin that I
I've got a Picker that comes up as the inputView for UITextField instead of

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.