Sh*t my brain says and forgets about

UIKit Dynamics – Turning on Debug Mode

In iOS 9 Apple has introduced a number of new shiny things for UIKit Dynamics. One of them is UIFieldBehavior which describes magnetic, electrical and spring fields of influence. Fields are hard to debug (even in real life!) so Apple decided to provide a debug mode on UIDynamicAnimator. The trick is the debug mode isn’t published in the headers. Why? Who knows. They mentioned it quite plainly at WWDC 2015 and said you have to turn it on in the LLDB debugger.

I found an easier and more straightforward way. Just use key-value coding! UIDynamicAnimator still inherits from NSObject so the KVC helper methods are still there.

https://gist.github.com/astralbodies/f346b07e7788f2c975a4

Easy!

Previous

Biggest Lie To Your ADHD Self

Next

Missing my DSLR Camera

1 Comment

  1. Maks Martynov

    Thanks a lot, Aaron!

Leave a Reply

Your email address will not be published. Required fields are marked *

Powered by WordPress & Theme by Anders Norén