I have an subview that fades into the view. this goes perfectly with this code:
UIView.animateWithDuration(0.9, animations: {
self.popUpView.backgroundColor = UIColor.blackColor()
})
But how can i make a sort of bounce? That the popupview fades in very hard and bounces a little bit back.
From
UIView
, you could use:To change the bounciness you'll want to change the
dampingRatio
; zero being the most bouncy and one being the least bouncy. From theUIView
documentation: