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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:43:06+00:00 2026-06-03T10:43:06+00:00

I need you to humor me during this question. This is somewhat pseudo code

  • 0

I need you to humor me during this question. This is somewhat pseudo code because the actual situation is quite complex. I wouldn’t load an image this way unless I needed to. Assume that I need to.

NSURL *bgImageURL = [NSURL URLWithString:@"https://www.google.com/images/srpr/logo3w.png"];

UIImage *img = [UIImage imageWithData:[NSData dataWithContentsOfURL:bgImageURL]];

[self.anIBOutletOfUIImageView setImage:img];

but I crash out with

-[__NSCFData _isResizable]: unrecognized selector sent to instance 0x9508c70

How can I load an image from a URL into NSData and then load that NSData into a UIImage and set that UIImage as the image for my UIImageView?

Again, I realize this sounds like nonsense, but due to an image caching system I’m using I have to do things this way 🙁

  • 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-03T10:43:07+00:00Added an answer on June 3, 2026 at 10:43 am

    I plugged this code into a new, iPad “Single view application” template:

    - (void)viewDidLoad {
        [super viewDidLoad];
        // Do any additional setup after loading the view, typically from a nib.
        NSURL *bgImageURL = [NSURL URLWithString:@"https://www.google.com/images/srpr/logo3w.png"];
        NSData *bgImageData = [NSData dataWithContentsOfURL:bgImageURL];
        UIImage *img = [UIImage imageWithData:bgImageData];
        [[self Imageview] setImage:img];
    }
    

    I got the image to load up properly. I even tried different content modes for the UIImageView, and they all worked as expected.

    If you start from scratch, do you get the same problem?

    The error message indicates that you’re sending a message of “_isResizable” to an NSData object. Maybe you’re inadvertently setting the UIImageView‘s image property equal to the NSData instead of the UIImage.

    Edit/Update

    I even went back and tried different versions of “one-lining” the code to see if any of that mattered, since my “working” copy was slightly altered from your non-working copy. I couldn’t get the code to break. My guess would be that the code in question isn’t broken, but something nearby is…

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

Sidebar

Related Questions

Need some insight on how this works I have the following piece of code
Need some help to solve this. I have a gridview and inside the gridview
need a little help with this one. I have a form that I am
Need to add it to textview, for example, standard java-code.
Consider this method (pardon the sad attempt at Chuck Norris humor :) ): public
Need to launch a new ASP.NET site on this server but need to be
Need a div to partially show the image behind it, is this even possible?
Need some advise on what I am doing wrong during client JSON parsing... Tips
need to return an array like this for example: array(30 => 'Mercedes Benz 310
need favour in twitter code hello, i need a little favour if any buddy

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.