13

I know there are lots and lots of tutorials and discussions out there on how to implement a bouncy collectionViewLayout using UIKitDynamics.

There is even a WWDC 13 Session video addressing the exact topic of replicating the "message bubbles" in the iOS7 Messages App.

I created my own "bouncy layout" following the session video and using this tutorial which also provides the details on implementing a tiling mechanism, which makes sure things are running smoothly even with thousands of cells.

However, the result still is very different from what we can see in the Messages App and my goal was to replicate the EXACT SAME BEHAVIOR as the messages app.

  1. No matter how many different values i provide for the UIAttachmentBehavior properties (length, damping, frequency), I can't get the bouncing right.
    The session video says that setting a value > 0 for length breaks things, because the cells would not return to their actual position. However, i could only reproduce the smooth and fast decelerating the Messages App shows by setting ~0.5 for length ?
  2. When the collectionView reaches it's bounds ends there is a nice exaggerated bounce for the last few bubbles in the Messages App where my "tutorial implementation" just doesn't bounce at all.

There is a discussion in the developer forums : Apple Dev Forums Discussion

Some suggest using multiple UIAttachmentBehaviors per Cell, others say applying UIView - spring Animations can give you this desired effect. There is even the assumption that the Messages App does not use UIKitDynamics + UICollectionView at all. (i doubt that Apple is not using this obvious technique for that)

So my question: Has anyone successfully implemented an exact replication of the Message bubbles behavior ? What more can i do to get answers regarding this topic ?

CodingMeSwiftly
  • 3,231
  • 21
  • 33

0 Answers0