2

I am trying to create an animation where an image view is moving up and down vertically. I have a line that the imageview is passing through, and my intention is to have the imageview hide partially when passing through the line. For example, if the line is halfway between the imageview, then the bottom half of the imageview should be hidden. Therefore, it would be ideal if there was a library of function that could hide a fraction of the imageview based on a specified y position. Please find examples of what I mean in the attached screenshots. enter image description here

enter image description here

In this screenshot, the part of the circle (imageview) underneath the line should be hidden, but the top half should be shown.

Also, keep in mind that the background is a changing gradient so I wouldn't be able to use a rectangular view with the same background color to hide the circle.

Patrick
  • 165
  • 2
  • 2
  • 8
  • Why don't you draw a rectangle view within a line and same background color, then bring it to front? – ovo Jun 20 '17 at 03:51
  • Will you please try [here for Animation](https://www.cocoacontrols.com/search?q=animation) – Raksha Saini Jun 20 '17 at 04:35
  • Sorry I forgot to mention that the background is a gradient so I cant just make a rectangle view with the same background color. Also, the background changes constantly in my application. @ovo – Patrick Jun 20 '17 at 18:30

0 Answers0