Closed eirikvaa closed 5 years ago
Never mind, I did a Clean and it worked. Sorry! :')
Hello, I still have this EXC_BAD_ACCESS issue on iOS 13.0 Simulator only
Using Xcode 11 GM
@objc open class Messenger : NSObject {
@objc open class func showStatusBarMessage(_ msg: String, sender: UIViewController, selector: Selector) {
let status = MessageView.viewFromNib(layout: .messageView)
//status.button?.isHidden = true
status.backgroundView.backgroundColor = UIColor.white
status.iconImageView?.tintColor = UIColor(red: 0.11, green: 0.47, blue: 0.89, alpha: 1.0)
status.iconImageView?.image = UIImage(named: "1567-refresh-2")
//status.iconImageView?.isHidden = true
status.configureDropShadow()
status.titleLabel?.isHidden = true
status.bodyLabel?.textColor = UIColor.black
status.iconLabel?.isHidden = true
//[UIColor colorWithRed:0.11 green:0.47 blue:0.89 alpha:1.0]
status.button?.setTitleColor(UIColor(red: 0.11, green: 0.47, blue: 0.89, alpha: 1.0), for: .normal)
//status.button?.setTitle(R.string.localizable.close(), for: .normal)
status.button?.setTitle("Télécharger", for: .normal)
status.button?.addTarget(sender, action: selector, for: .touchUpInside)
status.configureContent(body: msg)
var statusConfig = SwiftMessages.defaultConfig
statusConfig.presentationStyle = .bottom
//statusConfig.presentationContext = .window(windowLevel: UIWindowLevelNormal)
statusConfig.duration = .seconds(seconds: 4)
SwiftMessages.show(config: statusConfig, view: status)
}
@objc open class func hide() {
SwiftMessages.hide()
}
}
@Ezor please make sure you’re on SwiftMessages 7.0.1, clean your project, and let me know what line of code is crashing.
A couple of unrelated tips:
````swift
at the beginning of your code block to enable syntax highlighting (as you can see above – I edited your post).showStatusBarMessage
by copying MessageView.nib
into your project and modifying it directly (e.g. just delete elements you aren’t using, change colors, adjust margins, etc.).I just found the issue. My project was set to compile using Swift 4.2. I set to use Swift 5.0 (as SwiftMessages) and the problem is gone.
We're making sure our application is compatible with iOS 13. Using Xcode 11 GM and SwiftMessages 7.0.0. This crashes and gives
EXC_BAD_ACCESS
:Also trying to access
.bodyTitle
,.button
, et cetera crashes.