4

How can I achieve a stretch animation look?

Where do I need to start looking? CABasicAnimation does not seem to do the trick. Something like this: is the desired effect:

http://inspirationmobile.tumblr.com/post/112168531484/sidebar-animation-by-jacub-antalik-ramotion-com

2 Answers2

3

There is a lot more than a simple animation in this view. It is used UIKitDynamics, but the smart thing is that the final effect is composed by the single effects of small invisible UIViews inside that view.
The border is a CAShapeLayer made by a combination of bezier path that interpolates those single views.
Each drawing cicle, the CAShapeLayer path is refreshed based on the position of those views.
You can find more about this effect here.

Andrea
  • 26,120
  • 10
  • 85
  • 131
0

For such a complicated shape animation look into CAShapeLayer and UIBezierPath. Look at this SO thread that might help you to get started at least.

Community
  • 1
  • 1
NKorotkov
  • 3,591
  • 1
  • 24
  • 38