11

Does anybody have an idea how the genre selection bubbles in Apple music were made? The movement seems to be done with UiKit Dynamics. I definitely see collision behaviors but can't seem to reproduce the fluidity of the drag movement and the gravity towards the center of the view. I tried using UIPushBehavior and UiSnapBehavior, but no luck.

screenshot

Dănuț Mihai Florian
  • 3,075
  • 3
  • 26
  • 44

3 Answers3

8

I don't think that it was done with UIKit Dynamics, I think they was using SpriteKit. I created a component that's can simulate similar physics

https://github.com/ProudOfZiggy/SIFloatingCollection_Swift

SIlvester
  • 760
  • 5
  • 13
5

It is possible with UIKitDynamics as well, but can be done with SpriteKit as well which makes it much easier to implement, I have written a small component which give similar kind of effect in Objecti-C using SpriteKit. You can find it here, Its not exactly the same but its near and you can take same approach to create your own or polish it as well.

Adnan Aftab
  • 14,377
  • 4
  • 45
  • 54
1

i have developed it using box2d and libGdx on android,, so using libGdx u can use my code logic for iOS also... have a look at my project, hope it helps, https://github.com/mohitKejriwal/Bubble-UI-Android

mohit kejriwal
  • 1,755
  • 1
  • 10
  • 19