You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BendableView is a UIView subclass that bends its edges when its position change is animated. Internally, BendableView contains CAShapeLayer, which acts as its background. The layer's path changes during animations, creating an effect of bending. Subviews stay intact. You can find a more extensive description on my blog: Recreating Skype's Action Sheet Animation and Follow-Up Post.
Usage
BendableView contains three public properties:
vardamping:CGFloat // set to animate the view's edges differently than the whole view (used in an internal spring animation)
varinitialSpringVelocity:CGFloat // same as above
varfillColor:UIColor // "background" color of the bendable layer
You should set them before animating the position change of the view. I propose to use slightly lower values for damping and initialSpringVelocity than the values used when calling +animateWithDuration:delay:usingSpringWithDamping: initialSpringVelocity:options:animations:completion:, just like in this example: