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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:15:20+00:00 2026-06-10T06:15:20+00:00

I am using UIImage *image = @some image [image drawInRect:CGRectMake(50,50, 100, 100)]; How can

  • 0

I am using

UIImage *image = @"some image"

[image drawInRect:CGRectMake(50,50, 100, 100)];

How can i check draw image only

if(cgrect(50, 50, 100, 100) doesn't have an image){
        // only then draw the image

  }
  • 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-10T06:15:21+00:00Added an answer on June 10, 2026 at 6:15 am

    Quartz (the 2D graphics system on iOS) uses the painter’s model of graphics composition, and in most cases draws to a single-layer buffer.

    What that means is that once content is drawn to a graphics context, it is flattened into the context and its pixels become part of the scene. Think of it like painting a picture: once you put down paint on your canvas, it covers up anything underneath and becomes inseparable from paint already present there.

    In order to determine if an image was previously drawn in a graphics context, you will have to maintain some state external to the context (e.g. a BOOL didDrawImage.) Exactly what you need to do depends on your goal. If you tell us what you’re trying to achieve, we may be able to provide alternate solutions to the problem.

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

Sidebar

Related Questions

how can I draw into an existing UIImage using monotouch? I load an image:
I am trying to do some Image processing on a UIImage using some EAGLView
We can add an image to an photo album using UIImage *img = [UIImage
I have some operations that are inside blocks. This operations, only update an UIImage
I have read some posts on this website about using drawInRect instead of the
USing UIImage, I know we can store an image from a URL. But I
I'm subclassing UITableViewCell to have one image on the far left, then some text
I'm using the following code to rotate an image http://www.platinumball.net/blog/2010/01/31/iphone-uiimage-rotation-and-scaling/ that's one of the
I have a sprite sheet, and would like to use it using UIImage in
I have an odd problem with captureStillImageAsynchronouslyFromConnection. If I save the image using jpegStillImageNSDataRepresentation

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.