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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:03:32+00:00 2026-06-06T08:03:32+00:00

I have a small png that I am adding to a view which I

  • 0

I have a small png that I am adding to a view which I am pretty sure I had working previously but suddenly stopped working on the iPad itself while continuing to work fine on the iPad simulator.

Here is the code I am using to add the image to the view…

  UIImageView *bottomResizer = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"resizeLine.png"]];
  bottomResizer.center = CGPointMake(bottomResizer.center.x, bottomResizer.center.y+self.frame.size.height-12);
  bottomResizer.tag = 301;
  [self addSubview:bottomResizer]; 
  [bottomResizer release]; 

This occurs in a UIGestureRecognizerStateBegan event. The following code in removes the image in a touchesEnded event without any errors even though you cannot see it.

 NSArray *subViews = [self subviews];
 int count = [subViews count];
 for (int i =count-1; i>=0; i--) {
     if([[subViews objectAtIndex:i] tag] == 301) {
         [[subViews objectAtIndex:i] removeFromSuperview];

     }
 }

I don’t think it is anything I changed in my code since it works in the simulator. Not sure where to look next for the problem. I have reset the simulator to see if it would break after a reset. I have also cleaned the project.

Thanks.

John

  • 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-06T08:03:34+00:00Added an answer on June 6, 2026 at 8:03 am

    Put a breakpoint AFTER this line UIImageView *bottomResizer = [[UIImageView alloc]...

    Then on the console “po [bottomResizer image]”

    If it is nil then either the resource is not getting copied correctly into the bundle OR you could have a corrupt image that the device cannot load.

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

Sidebar

Related Questions

I have small script in bash, which is generating graphs via gnuplot. Everything works
I have small web app that generate PDF files as a report. I'm trying
I have a view in the UI that is technically an extended ImageView inside
Objective Have a small magnifying glass icon that appears in the top right corner
I have a small application that uses a DrawingArea to draw a simple map
I have a small problem while working on software for a Surface: I have
I have a large Png image file that I would like to display and
I have small animation using javascript and css. I made one sprite png file,
I have a small Java program that uses ImageIcons on JLabels to display pictures.
I have an ul with a li that cannot find a .PNG image associated

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.