SwiftKickMobile / SwiftMessages

A very flexible message bar for UIKit and SwiftUI.
MIT License
7.31k stars 743 forks source link

CustomNib forever not working #322

Closed lcuiandlc closed 5 years ago

lcuiandlc commented 5 years ago

static func demoCustomNib() { let view: TacoDialogView = try! SwiftMessages.viewFromNib() view.configureDropShadow() view.getTacosAction = { _ in SwiftMessages.hide() } view.cancelAction = { SwiftMessages.hide() } var config = SwiftMessages.defaultConfig config.presentationContext = .window(windowLevel: UIWindow.Level.statusBar) config.duration = .forever config.presentationStyle = .bottom config.dimMode = .gray(interactive: true) SwiftMessages.show(config: config, view: view) }

config.duration = .forever not working.

wtmoose commented 5 years ago

Put a breakpoint in SwiftMessages.internalHide(id:) to find out what is causing the message to hide. This question comes up occasionally and it always turns out that people are accidentally calling hide somewhere.