Swiftmessages: Incorrect margin adjustments in landscape

Created on 15 May 2018  路  3Comments  路  Source: SwiftKickMobile/SwiftMessages

Hello guys,

I was testing the cool library. and I don't know if its a bug. when using layout as statusLine with no tab bar controller, in landscape mode the message is under the home bar of iPhone X as shown in the image below

simulator screen shot - iphone x - 2018-05-15 at 22 01 54

Here is the code I used

        let view = MessageView.viewFromNib(layout: .statusLine)
        view.configureTheme(backgroundColor: UIColor.blue, foregroundColor: .white)

        view.configureContent(body: "Hello Lohen Yumnam")


        var config = SwiftMessages.Config()
        config.presentationStyle = .bottom // Slide up from the bottom.
        config.shouldAutorotate = true
        config.interactiveHide = true
        config.duration = .forever
        config.presentationContext = .window(windowLevel: UIWindowLevelStatusBar)

        // Show the message.
        SwiftMessages.show(config: config, view: view)

bug

All 3 comments

Thanks for bringing this to my attention. It definitely shouldn't do that. I'll take a look.

@lohenyumnam Forgot to mention that the fix for this is on the head of master. Will release soon (looking at a couple of other things).

This fix is available in 4.1.3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattem86 picture mattem86  路  4Comments

iamsanketray123 picture iamsanketray123  路  6Comments

H-Ghadirian picture H-Ghadirian  路  6Comments

shukaka picture shukaka  路  5Comments

andrey-zelenin picture andrey-zelenin  路  4Comments