UIStackView.init(frame:) must be used from main thread only
mehulparmar4ever opened this issue · 2 comments
mehulparmar4ever commented
Nikoloutsos commented
Hello 👋 @mehulparmar4ever
May you please provide more information on how you calling Toast-swift library (the calling site)?
mehulparmar4ever commented
@Nikoloutsos , Thank you for the reply, Here is what you are looking for..
XCode Version 15.2 (15C500b)
Mac mini Apple M2 Pro with MacOS Sonoma 14.3.1 (23D60)
Usage,
AppAlert.shared.showToast(message: error.getLocalisedErrorMessage(), isWarning: true)
AppAlert.shared.showToast(message: LocalizedText.getText(key: .codeSMS))
on main thread,
func main_thread(closure:@escaping ()->()) {
let when = DispatchTime.now()
DispatchQueue.main.asyncAfter(deadline: when, execute: closure)
}