我想在被重力拉下来之前,把这个东西简单地弹出来。现在,如果我加上推送效果,它就会启动。
//Animate this new fake button
UIGravityBehavior* gravity = [[UIGravityBehavior alloc] initWithItems:@[fakeButton]];
[gravity setMagnitude:1.0f];
UIPushBehavior *upFlick = [[UIPushBehavior alloc]initWithItems:@[fakeButton] mode:UIPushBehaviorModeInstantaneous];
[upFlick setAngle:M_PI/3 magnitude:1.0f];
[self.animator addBehavior:gravity];
[self.animator addBehavior:upFlick];发布于 2013-11-08 16:06:46
你应该使角度或震级负,这应该使它上升(并向侧面)。如果你想让它直线上升,你也应该把角度改变为M_PI/2。
https://stackoverflow.com/questions/19862575
复制相似问题