我希望这个项目在被重力拉下之前短暂弹出。现在,如果我添加推送效果,它就会启动。
//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];