SwiftKickMobile / SwiftMessages

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

Show content from safe area #383

Closed StackHelp closed 4 years ago

StackHelp commented 4 years ago

Right now I got the content like below using the custom nib. From the bottom it doesn't count for safe area space.

I want it to cover space from safe area like below image Simulator Screen Shot - iPhone 11 - 2020-03-23 at 12 09 44

Here is my code

        let view: UndoPostView = try! SwiftMessages.viewFromNib()
        var config = SwiftMessages.defaultConfig
        config.presentationContext = .window(windowLevel: UIWindow.Level.statusBar)
        config.presentationStyle = .bottom
        config.duration = .seconds(seconds: 4)
        SwiftMessages.show(config: config, view: view)
wtmoose commented 4 years ago

Attach your nib file please

StackHelp commented 4 years ago

@wtmoose Hi I got it to work by changed bottom constraint to safe area instead it was attached with superview. Thanks for your time.