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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:13:55+00:00 2026-06-03T02:13:55+00:00

I have a UIImageView,while loading it for the first time i should not have

  • 0

I have a UIImageView,while loading it for the first time i should not have any image so i will make the image nil.

self.myImageView.image = nil;

on pressing a button i need the image to be loaded using the imageWithData method as i have a image in NSData.While i am trying to do this the application crashes.I even tried allocating and using with initWithData that is of no help.

self.myImageView.image = [UIImage imageWithData:myImageData];

But, wheni use this method while loading for the first time using my data and then try to put it into Image view with the button press it works fine.

Please help me regarding this, Thanks.

  • 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-03T02:13:57+00:00Added an answer on June 3, 2026 at 2:13 am

    The problem was the scope of Variables. in view did load data was correct but in other method i was not getting the image so i used self.myImageData in view did load as well as in IB action method, now it works fine.

    Note: It would be diffcult to find the answer for this question in the comment so i have made it as answer and accepted it as correct

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

Sidebar

Related Questions

I have a UIImageView that starts off with an image (loading.png) specified in IB.
I have a UIImageView object that when clicked it will play a animation, I
I have a UIImageView which has a png image sequence loaded into it. My
I have a UIImageView showing a image that is larger than it's frame. It's
I have a UIImageView whose frame, set before the image is loaded, is always
I have an app where I want to have an image animation while I
I try to do TableViewController and TableCell have an image. While the row can
I have a UIImageView showing an image with the contentMode of UIViewContentModeScaleAspectFill. Then I
I have a UIImageView that contains an image of a circle. I would like
What I had done is: I have one IBOutlet for UIImageVIew and [self.imgPView setImage:[UIImage

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.