ios bubble animation tutorial

原文:http://www.jackrabbitmobile.com/design/ios-bubble-animation-tutorial/

其实我曾创建过一个bubbles的库,这个库叫JRMFloatingAnimation,这个库允许你全自定义“漂浮”图片视图

1. Create the fish

让我们创建一条鱼开始吧。首先创建一个新的Xocde project然后添加下面的的代码:
(我是从
freepik.com获取鱼图片资源,我的bubble图片是从这里

2. Do the math

3. Create the path

很好,现在创建我们的path。添加到你的createBubble方法中:

4. Create the animation

5. Pop the bubble

6. Add some variation

7. Animate the fish