views:

25

answers:

0

I have a rather complex graphic within the context of a UIView within a UIScrollView that is created on load using CGPath and GContext path functions. The graphic is static unless the user changes one of it's parameters which in turn calls setNeedsDisplay on the UIView.

The graphic is laid out over a 24 hour period and I now want to add a vertical line or a rectangular mask (shadow) that indicates the current time. What is the best (read simplest) method to update this time tick without redrawing the entire graphic. If, for example, it is a line I want it to move once a minute to the right, if it is a rectangular mask I want to increase it's width to the right every minute.

After browsing the docs and the forums I see that I have a couple of options but am still confused as to whether I should try to use UIView animation, CALayer, or something else.

In either case if anyone has or can point me to some sample code, that would be great.

Thanks,

John