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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:23:31+00:00 2026-06-04T23:23:31+00:00

I am trying to make application to draw on live camera. In that I

  • 0

I am trying to make application to draw on live camera. In that I have created a class with xib called PaintView, in which all the paint related functionality is running.

I am adding the paintview to cameraoverlay view. The view is added properly. But when I am touching the screen of device, the application is not able to draw anything, and the log shows following error

< Error >: CGContextSetLineWidth: invalid context 0x11b540

< Error >: CGContextSetRGBStrokeColor: invalid context 0x11b540

my code for adding sub view is

// Insert the overlay
       
overlay = [[PaintView alloc] initWithNibName:@"PaintView" bundle:nil];

//overlay.pickerReference = self.imagePicker;

[self.imagePicker.cameraOverlayView addSubview:overlay.view];

[self.imagePicker.cameraOverlayView bringSubviewToFront:overlay.view];

[self.imagePicker.cameraOverlayView setBackgroundColor:[UIColor clearColor]];

//self.imagePicker.delegate = overlay;
        
[self presentModalViewController:self.imagePicker animated:YES];

Please help me, how to draw on live camera !!!

Thanks in advance.

EDIT: In Paint view I am creating Image view, which is initialized like

drawImage = [[UIImageView alloc] init];

drawImage.frame = CGRectMake(20, 20, 320, 440);

[self.view addSubview:drawImage];

[self.view bringSubviewToFront:drawImage];

  • 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-04T23:23:33+00:00Added an answer on June 4, 2026 at 11:23 pm

    Hi I have got the solution ,

    I was making mistake, as the Context is not necessary to use, it will create issues.

    We need to use UIBezierPath, and the issues are solved. I am able to draw on live camera.

    here the reference to the link.

    Yea…..

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

Sidebar

Related Questions

I'm trying to make an application that - in some stage - stores all
I am trying to make an application which integrates facebook and twitter. I have
I'm trying to make an application which allows the user to draw shapes to
I'm trying to make an application that needs to draw on the desktop, behind
I'm trying to make an application in which both the developer and the end
I am trying to make an application that will fill in the info i
I am trying to make a application that uses the standard Split View Application
I am trying to make an application that opens a certain file type (similar
I am currently trying to make an application that allows the user to create
I have a WPF Application where I am trying to make a close button

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.