Skip to content

Conversation

@egold
Copy link

@egold egold commented Feb 28, 2014

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.

Allows for cleanup or other work to be done when view is dismissed by
a tap in the top area
@mixdesign
Copy link

Useful feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants