kentnguyen/KNSemiModalViewController — pull request #60 by egold (2014-02-28 20:49:13+00:00)
Title: Send a willDismissSemiModalView message if self responds to it

Allows for cleanup or other work to be done when view is dismissed by a tap in the top area. For instance, if you want to do status bar style changes upon display, but want to change back the status bar after dismissal. The transparent UIButton doesn't give the calling code the opportunity to do any updates, unlike when programmatically dismissing the semi-modal.

Other alternatives: a KNSemiModalOptionKey for the block, or using NSNotificationCenter. This seemed simpler than an option key, and I feel it's better than a notification because it's more like UIKit's messaging. And since it's a category, setting a delegate with objc_setAssociatedObject with making self the delegate of self seemed weird.