I created the animation by adding several layers to the UIView. These layers must be set visible or invisible using a script.
The script is based on objects that implement the protocol:
// the general protocol for a step @protocol ActionStep -(void) applyForTime:(int)playtime; -(void) reset; @end
a in the timer I repeat the step objects:
NSEnumerator* enumerator = [ScriptObjects objectEnumerator]; id obj; while ( obj = [enumerator nextObject] ) { id <ActionStep> step = obj; [step applyForTime:currentmilliseconds]; }
The script object is this object:
@interface LayerStep : NSObject <ActionStep> { int mTimeOffset; CGPoint mOffset; float mAlpha; LayerObject* mTheLayer; bool mPrepared; } -(id)initWithLayerObject: (LayerObject*) theLayer Milliseconds:(int) milliseconds Offset:(CGPoint) offset Alpha:(float)alpha; @end
and finally, I implement the protocol in the layer:
-(void) applyForTime:(int)playtime { if ( mPrepared )
Applying changes in a step results in a transition.
Is there any way to disable this transition? I donβt use the CoreAnimation call right now, only the properties themselves (see Code).
Zuppa
source share