-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Callback when presented and dismissed #50
Comments
Hi @pjcau, |
@huri000 tell me it's all right. If press edit on post, I can edit only the title not the labels. J |
Great. I'll figure something out and keep you posted (next few days). |
@huri000 Hello!
and in "okAction" I'm presenting the new controller. But the alert is flashing sometimes. If add some delay like 1 second (to be sure, that alert was closed) everything is fine Thanks |
I thinking, but there are other way to dismiss like drag o tap outside. I should general solution.
J
Inviato da iPhone
… Il giorno 14 giu 2018, alle ore 17:47, Banck ***@***.***> ha scritto:
@huri000 Hello!
I just wanted to open the same "issue". Could you please add completion block in SwiftEntryKit.dismiss() , because:
I present the new controller when some button was pressing in alert. I have this code:
alertView.okButtonDidTap = {
SwiftEntryKit.dismiss()
okAction?()
}
and in "okAction" I'm presenting the new controller. But the alert is flashing sometimes. If add some delay like 1 second (to be sure, that alert was closed) everything is fine
Thanks
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I tried your solution but infact works only the user taps the button, not drag or tap outside the message to dismiss. Maybe it's not the good solution for me and this feature. J |
Seems you didn't get me. |
After thinking about it, I'm goings to add another construct to EKAttributes that contains the entry life-cycle callbacks. It's going to look something like: public struct LifecycleActions {
public typealias Action = () -> Void
/** Executed before the entry appears - before the animation starts.
Might not get called in case another entry with a higher display priority is displayed.
*/
public var willAppear: Action?
/** Executed after the animation ends.
Might not get called in case another entry with a higher display priority is displayed.
*/
public var didAppear: Action?
/** Executed before the entry disappears (Before the animation starts) */
public var willDisappear: Action?
/** Executed after the entry disappears (After the animation ends) */
public var didDisappear: Action?
public init(willAppear: Action? = nil, didAppear: Action? = nil, willDisappear: Action? = nil, didDisappear: Action? = nil) {
self.willAppear = willAppear
self.didAppear = didAppear
self.willDisappear = willDisappear
self.didDisappear = didDisappear
}
} In addition:
Let me know your thoughts. |
@huri000 I think that’s OK. J |
Check out 0.4.2
I'm a little conflicted about an additional event for pop. It seems overdone to me but I'm still considering it. Let me know if you think otherwise. I consider the issue resolved. 🎉 |
thanks for this! especially if u working with |
Is your feature request related to a problem? Please describe.
I should have a callback when popup is presented and dismissed, to do actions after presented or dismissed popup.
Describe the solution you'd like
I should have a callback when popup is presented and dismissed.
Describe alternatives you've considered
Maybe it's possible to add a delegate with to methods when finishing the animation for presenting and same when dismissing.
Additional context
nothing
The text was updated successfully, but these errors were encountered: