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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:11:33+00:00 2026-06-11T03:11:33+00:00

I am trying to make image compare an a very specific way. I’m putting

  • 0

I am trying to make image compare an a very specific way. I’m putting 2 UIImageView one on top of another and i have vertical line that you can drag from left to right and backwards. When user dragging this line i need that the top view will be “transparent” or cropped until that line.
I tried to using crop but it very slow and inaccurate, didn’t manage to do un-crop when dragging the line backwards. Can some one lease point int the wright direction how to make this happen.

  • 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-11T03:11:35+00:00Added an answer on June 11, 2026 at 3:11 am

    This isn’t too difficult but it’s definitely not straightforward. I think I can point you in the right direction.

    First you’re going to need to create a CAShapeLayer large enough to cover the top UIImageView. Set this new mask layer as the mask of the layer of your top-most image view.

    CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
    maskLayer.path = [UIBezierPath bezierPathWithRect:topImageView.bounds].CGPath;
    topImageView.layer.mask = maskLayer;
    

    Now you’re going to need to change the position of maskLayer to achieved the desired results. I’m assuming that you’re using a UIPanGestureRecognizer to handle dragging the vertical line from left to right and vice versa. In the method that’s triggered by the gesture recognizer, you’re going to inspect the translationInView property and use it’s x value to change the position of mask layer. This will effectively let you move the mask layer around with your finger and will begin to hide portions of the top image view and let the bottom one show from beneath.

    • 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 image appear on top of another and still show
I am trying to make simple app that allows one to compare image to
I am trying to make an image gallery where you have a thumb of
I have an issue when I'm trying to make my image or label visible
Im trying to make this image fade into the one below it using a
I am trying to make a image gallery similar to one in anntaylor site
I'm trying to make an Image out of one of my Canvas ( myPrintingCanvas
I'm trying to make a image editor in Flex 4.5. However, there's one little
i'm using jCrop and CodeIgniter, trying to make an image uploader. So i have
I am trying to make an image animate and make it larger. I have

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.