iphone - Error: Parameter name omitted -
i'm trying have auto reversing animation, , getting above error on "completion:^(bool)finished{" line.
[uiview animatewithduration:0.5 delay:0 options:uiviewanimationoptionautoreverse animations:^{ [[[self diebuttons] objectatindex:i] settransform:cgaffinetransformmaketranslation(0, 200)]; } completion:^(bool)finished{ }];
note first attempted following code button jumped new location @ end of animation.
[uiview beginanimations:nil context:nil]; [uiview setanimationduration:0.5]; [uiview setanimationrepeatautoreverses:yes]; [button settransform:cgaffinetransformmaketranslation(0, 200)]; [uiview commitanimations];
finished
name of bool
parameter, , objective-c blocks have c-style function signatures, has in parentheses.
the block's signature supposed this:
^(bool finished) { }
Comments
Post a Comment