iOSDropDown
iOSDropDown copied to clipboard
Intermittent crash on closure
Please help, how can I protect against this type of crash?
Crash log:
Crashed: com.apple.main-thread
0 myapp 0x10292ac14 GetStartedQuickVC.viewDidLoad() + 89 (GetStartedQuickVC.swift:89)
1 myapp 0x10292b2a0 @objc GetStartedQuickVC.viewDidLoad() + 4297503392 (
crash here line 89<<< drAction.didSelect{(selectedText , index , id) in //update and return if selectedText == "Bought" { self.action = "B" } else if selectedText == "Sold" { self.action = "S" if let s = UserDefaults.standard.string(forKey: "tip_sold"), s == "Y" {
} else {
let appearance = SCLAlertView.SCLAppearance(
kTitleFont: UIFont(name: "HelveticaNeue", size: 20)!,
kTextFont: UIFont(name: "HelveticaNeue", size: 14)!,
kButtonFont: UIFont(name: "HelveticaNeue-Bold", size: 12)!,
showCloseButton: false,
showCircularIcon: false,
buttonsLayout: .vertical
)
let alertView = SCLAlertView(appearance: appearance)
alertView.addButton("Ok",backgroundColor: UIColor.gray, textColor: UIColor.white) {
return
}
alertView.addButton("Don't show again",backgroundColor: UIColor.gray, textColor: UIColor.white) {
UserDefaults.standard.set("Y", forKey: "tip_sold")
return
}
alertView.showSuccess("xx.", subTitle: "", colorStyle: 0x000000, colorTextButton: 0xFFFFFF)
}
} else {
self.action = ""
}
}
is this related to iOS drop down ??