Thinking Out Loudios-dev

Debugging with Private API

Wed, Nov 16, 2016

UIKit has a built in physics engine called UIKit Dynamics. It’s how Apple has implemented quite a few of the animations in iOS. It’s pretty powerful but it can also be a pain in the ass to debug. According to Session 229 from WWDC 2015, the supported way for debugging is to use private API on UIDynamicAnimator. There are some hacks for gaining access to private API inside of Objective-C — things like using NSInvocation — but they’re not supported in Swift. That’s ok though, because Apple actually wants us to use lldb to access this private API.

  1. ios-dev
  2. objective-c
  3. swift
  4. lldb
  5. uikit-dynamics

Followup – Custom Presentation Controllers and Adaptability

Mon, Aug 10, 2015

As the title suggests, this is a followup to my previous post about Custom Presentation Controllers and Adaptability. In that post I argued that the current API for custom presentation controllers is a little lacking when it comes to switching between custom and system provided presentations during the life of a single presentation. A friend of mine proposed a workaround that I’d like to explore. Feel free to grab the code and follow along: CustomAdaptablePresentation

  1. adaptability
  2. ios-dev
  3. presentation

UIBarButtonItem and Custom Views

Tue, Apr 28, 2015

First things first. UIBarButtonItems are not views. They’re more akin to model level objects. You create them and set up styling on them, but the framework converts their properties into actual UIView subclasses. And this is were the majority of problems that I have with UIBarButtonItem come from.

  1. uibarbuttonitem
  2. ios-dev