0

I have some square UIView, inside I have an image that looks like a sin signal. I would like to move that image inside this view from left to right but create infinite effect - so it seems that the sin signal is always going from left to right.

The only way I see is to animate it to move right and when its there simply add it again on left, then remove the previous, etc.

I suspect this would cause memory issues if done on multiple views inside a cell. Is that the right way to go ?

Curnelious
  • 1
  • 16
  • 76
  • 150
  • When you say 'sin signa'l are you referring to a sine wave? i.e. the output of the sin() function? Like a simple oscilloscope signal? – Ali Beadle Apr 08 '17 at 11:54
  • @AliBeadle Yes for example, or any other periodic function that can create an infinite effect inside a rect :) – Curnelious Apr 08 '17 at 13:42
  • 1
    So it can be generated rather than pre-drawn in an image? If so have you seen [this SO question](http://stackoverflow.com/q/17533961/2466193) and its accepted answer? – Ali Beadle Apr 08 '17 at 14:10
  • Thanks very much, Well i know how to do that also, I just wonder what would be less memory consumer, assuming its going to be inside multiple cells in a collection view. I wonder if moving an image or using a bezier . – Curnelious Apr 08 '17 at 16:49
  • For memory I would expect a Bezier to much be significantly smaller than an equivalent resolution image. A quadratic Bezier is just four CGPoints (that is an over simplification, other 'stuff' will be stored for both object types). – Ali Beadle Apr 09 '17 at 15:37

0 Answers0