SwiftKickMobile / SwiftMessages

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

Crash when i use SwiftMessages.defaultConfig #384

Closed hemendraggohel closed 4 years ago

hemendraggohel commented 4 years ago

Working fine with below code.
let view = MessageView.viewFromNib(layout: .cardView) // Theme message elements with the warning style. view.configureTheme(.error) view.configureDropShadow() view.configureContent(title: "Error", body: "Title") view.button?.isHidden = true // Show the message. SwiftMessages.show(view: view)

When i add

SwiftMessages.defaultConfig.presentationStyle = .bottom

then it is crashing with latest OS 13.3.1.

wtmoose commented 4 years ago

That seems unlikely. Whats is the stack trace?

mojidabckuu commented 4 years ago

@wtmoose happening happening to me. This line causing the crash

let arrayOfViews = resolvedBundle.loadNibNamed(name, owner: filesOwner, options: nil) ?? []

exception is

[MyApp.TheMessagesView 0x7f9199c4ef50> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key statusBarOffset.
mojidabckuu commented 4 years ago

Ok, figured out. In my case the update jump was too big and seems statusBarOffset is the legacy.