Swiftmessages: Tab outside to not dismiss

Created on 2 Jan 2019  路  1Comment  路  Source: SwiftKickMobile/SwiftMessages

I'm using this code to open dialog from xib file using segue:

let vc = Wallet(nibName: "Wallet", bundle: nil) vc.view.heightAnchor.constraint(equalToConstant: self.view.frame.height / 2.5).isActive = true let segue = SwiftMessagesSegue(identifier: nil, source: self, destination: vc) segue.configure(layout: .bottomMessage) segue.interactiveHide = false // i assume that this code can prevent the click outside segue.perform()

but i still can dismiss the dialog when user click outside the view. so how to prevent user to click outside view to dismiss the dialog?

Most helpful comment

swift /// Specifies whether or not the interactive pan-to-hide gesture is enabled /// on the message view. The default value is `true`, but may not be appropriate /// for view controllers that use swipe or pan gestures. public var interactiveHide: Bool { get { return messenger.defaultConfig.interactiveHide } set { messenger.defaultConfig.interactiveHide = newValue } }

Use

swift segue.dimMode = .gray(interactive: false)

>All comments

swift /// Specifies whether or not the interactive pan-to-hide gesture is enabled /// on the message view. The default value is `true`, but may not be appropriate /// for view controllers that use swipe or pan gestures. public var interactiveHide: Bool { get { return messenger.defaultConfig.interactiveHide } set { messenger.defaultConfig.interactiveHide = newValue } }

Use

swift segue.dimMode = .gray(interactive: false)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CallMeSH picture CallMeSH  路  4Comments

b992 picture b992  路  4Comments

allaire picture allaire  路  3Comments

Khalphion picture Khalphion  路  4Comments

mattem86 picture mattem86  路  4Comments