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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:38:35+00:00 2026-05-23T10:38:35+00:00

I have a UIImageView . I would like to get it’s context so that

  • 0

I have a UIImageView.

I would like to get it’s context so that I can draw ontop of it.

I understand I can get my main graphic context by calling UIGraphicsGetCurrentContext(), but I would like to draw on my image view, not the background of the form. Is this possible, and if so how?

I attempted to draw to the main UI graphics context, but nothing appeared. I assume it is drawing under my image views. Am I correct or am I confused in this context?

  • 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-05-23T10:38:35+00:00Added an answer on May 23, 2026 at 10:38 am

    You’re a little confused. 🙂 The view doesn’t have a context. When the view is about to be painted on the screen, UIKit sets up a graphics context, gives it to the view, and calls the view’s drawRect:. The view can then put drawing instructions into the context. Once the view is done, UIKit whisks the context away and turns the drawing instructions into a bitmap, which it puts on the screen.

    So the view only has access to a graphics context that’s going to the screen when UIKit sets it up. In order for you to get access to this context, you have to put code inside the view’s drawRect:. You can’t actually draw into an arbitrary view on the screen.

    What you can do is put your own, mostly-transparent view on top of it and draw into that.

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

Sidebar

Related Questions

I would like to have an UIImageView that flickers. I thougt I can make
I have a UIImageView that I would like to change its image with animation.
I have a UIImageView that contains an image of a circle. I would like
I have a CALayer and I would like to use it as an UIImageView
I have a UIView that I would like to animate into the screen in
I have a subclass of UIImageView and would like to pass self as a
I have a UIImageView connected to a game I coded. However I would like
I have two views that I would like to fade in and out. I
I have an image that I would like to display in a UITableViewCell using
I have a an app that has a UITabBarController . What I would like

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.