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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:27:27+00:00 2026-05-23T16:27:27+00:00

I have been trying to create a simple swipe transition. However buttons seem immune

  • 0

I have been trying to create a simple swipe transition. However buttons seem immune to any CAAnimation that crops.

I am trying to get it so that a bar moves across the screen and as it goes over the button it removes the part it has just gone over.

I have tried bounds.width, size.x and many other key-value paths to achieve the affect but I haven’t got what I wanted. It just relocates the text which always remains entirely visible
I have also tried changing the UIButton to a UIImage but the text does not seem to print on a UIImage.
I tried using masks too but I have heard they should be used as infrequently as possible as they consume the phones resources. I didn’t really get very far with this either anyway as I hadn’t used them much before.
I also tried placing it in a container view and then change the dimensions of that but again all of the text remained entirely visible.

I know I could have a view hide the button but I am trying to reveal the view behind as the bar swipes.

Does anyone have any suggestions of how to achieve a swipe transition on a UIButton?

Help would be much appreciated.

Thanks

  • 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-23T16:27:27+00:00Added an answer on May 23, 2026 at 4:27 pm

    I think what you’re looking for really is a mask. See the tutorial here:
    http://iosdevelopertips.com/cocoa/how-to-mask-an-image.html

    What I’d do in your situation is create a custom UIButton class, and add a mask as in the tutorial, then animate the position of the mask. Slide the mask of, nothing shows. Slide it on, part shows until the whole thing is visible.

    Edit: I haven’t really heard anything about hogging resources, especially since it appears to be simple core graphics.

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

Sidebar

Related Questions

I have been trying to create a simple application that will let the user
I have been trying to create a simple app that parse an entire channel
I have been trying to create a simple program with Python which uses OpenCV
I have been trying to create a Ruby program that will be running online
I have been trying to create a menu panel with jQuery that can be
I have been trying for some time to create a class/series of classes that,
I have been trying to create a simple point light in HLSL for a
Hello Guys! I have been trying to create a simple sample code for my
I have been trying to create a fairly simple application in WPF following the
I have been trying to create a simple calculator. Using PHP I managed to

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.