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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:07:20+00:00 2026-05-27T12:07:20+00:00

Hi i will like to create an eraser animation or core graphic that looks

  • 0

Hi i will like to create an eraser animation or core graphic that looks like rubbing away the current content and add in a new content on a uibutton when i tapped on the view or button.

is it tough to do it ?, any tutorial or web link to show how to do it ?

enter image description here

  • 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-27T12:07:20+00:00Added an answer on May 27, 2026 at 12:07 pm

    Hi, we can use this eraser functionality with core animation in our app like below:

            CGPoint currentPoint = [touch locationInView:imgBlankView];
    
            UIGraphicsBeginImageContext(self.view.frame.size);
            [imgBlankView.image drawInRect:CGRectMake(0, 0, self.view.frame.size.width, imgBlankView.frame.size.height)];
    
            CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
            CGContextSetLineWidth(UIGraphicsGetCurrentContext(),lineWidth);
            CGContextSetBlendMode(UIGraphicsGetCurrentContext(), kCGBlendModeClear);
    
            CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), red, green, blue, 1.0);
            CGContextBeginPath(UIGraphicsGetCurrentContext());  
            CGContextSetShouldAntialias(UIGraphicsGetCurrentContext(), YES);
    
            CGContextMoveToPoint(UIGraphicsGetCurrentContext(), lastPoint1.x, lastPoint1.y);
            CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), currentPoint.x, currentPoint.y);
            CGContextStrokePath(UIGraphicsGetCurrentContext());
            imgBlankView.image = UIGraphicsGetImageFromCurrentImageContext();
    
            UIGraphicsEndImageContext();
            lastPoint1 = currentPoint;
    

    Use this code for erase the drowning which you draw with the core animation like circle ,rectangle or any CALayer like drowning with this code.

    Put this code in your touch move method and as per user touches on the view it erase that on with this code enjoy erasing functionality with this code.

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

Sidebar

Related Questions

I would like to create a new controller that will allow the admin user
I like to create a specific filename for a file that will be created
I would like to create a regular expression that will replace a normal space
I'd like to create a regex that will match an opening <a> tag containing
I would like to create a caching system that will bypass some mechanisms in
I would like to create a function that will return list of type that
I'd like to create a regular expression that will match and return based on
I would like to create a program that will run in background as a
I would like create a web service in ASP.Net 2.0 that will supports JSON.
I would like to create a view where this subview will be in repeated

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.