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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:09:59+00:00 2026-05-30T03:09:59+00:00

i am making a drawing with finger app. I want to set a start

  • 0

i am making a drawing with finger app.

I want to set a start point and end point.

My project is like this, it has a background that will tell you the direction to draw. when the user hits the end point the background will change.

i tried this…
On touches began…

    drawPoint = [touch locationInView:self.view];
    CGRect writingStartPoint = CGRectMake(90, 800, 30, 30);
    CGRect writingEndPoint = CGRectMake(390, 800, 30, 30);

    if (CGRectContainsPoint(writingStartPoint, drawPoint))
    {
        //something
    }

   if (CGRectContainsPoint(writingEndPoint, drawPoint))
        {
            //change background
        }

it’s not working.

Is there another way?

  • 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-30T03:10:01+00:00Added an answer on May 30, 2026 at 3:10 am

    you should check is touch in end rectangle on touch moved or ended method

    - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
        UITouch *touch = [touches anyObject];
        CGPoint drawPoint = [touch locationInView:self.view];
        CGRect writingStartPoint = CGRectMake(90, 800, 30, 30);
        if (CGRectContainsPoint(writingStartPoint, drawPoint))
        {
            //something
        }
    }
    
    - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
        UITouch *touch = [touches anyObject];
        CGPoint drawPoint = [touch locationInView:self.view];
        CGRect writingEndPoint = CGRectMake(390, 800, 30, 30);
        if (CGRectContainsPoint(writingEndPoint, drawPoint))
        {
            //change background if you want user see change without lift finger up
        }
    }
    
    - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
        UITouch *touch = [touches anyObject];
        CGPoint drawPoint = [touch locationInView:self.view];
        CGRect writingEndPoint = CGRectMake(390, 800, 30, 30);
        if (CGRectContainsPoint(writingEndPoint, drawPoint))
        {
            //change background when user lift finger up
        }
    }
    
    - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
        // handle cancel event
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making a desktop app with MonoMac that relies on system.drawing. This works
So I'm making a drawing app that uses flash. I want to be able
I'm making a drawing app. In the centre of the screen, I want the
I've got this strange bug in my app. I'm making a subview and drawing
I am making a drawing app and I want to increment my brush size
I've noticed that line drawings from the drawing app I'm making are very low
I am making a drawing app for iOS and I have the following classes:
I have a question about making a drawing app for Android. What is the
I'm making a simple drawing app on Android. I'm using the FingerPaint.java provided with
I am making a project where i am drawing waveform of an audio file

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.