Biranchi
Biranchi

Reputation: 16327

How to draw a sinusodial wave which varies with time on a UIView in Objective C?

I want to draw a sinusodial wave which varies with time on a UIView. What are the approaches should i take ? Any sample code is there ??

Upvotes: 0

Views: 464

Answers (1)

eipxen
eipxen

Reputation: 316

I believe the easiest way I've heard of doing what you want to do is using CAKeyframeAnimation.

There is a tutorial page with a sample project here: http://cocoawithlove.com/2008/09/parametric-acceleration-curves-in-core.html

There is a stackoverflow about something similar here: Basic keyframe animation (rotation)

and the Apple Developer Documentation lists an example application called "MoveMe" that uses keyframe animations

I do not think you have to go all the way to OpenGL for this, but it is certainly capable of this.

Upvotes: 1

Related Questions