Skip to content

Send a willDismissSemiModalView message if self responds to it#60

Open
egold wants to merge 2 commits into
kentnguyen:masterfrom
WishPlz:master
Open

Send a willDismissSemiModalView message if self responds to it#60
egold wants to merge 2 commits into
kentnguyen:masterfrom
WishPlz:master

Conversation

@egold

@egold egold commented Feb 28, 2014

Copy link
Copy Markdown

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
Copy Markdown

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