Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIStackView.init(frame:) must be used from main thread only #57

Open
mehulparmar4ever opened this issue Feb 19, 2024 · 2 comments
Open

Comments

@mehulparmar4ever
Copy link

Screenshot 2024-02-19 at 12 00 02 PM

@Nikoloutsos
Copy link
Contributor

Hello 👋 @mehulparmar4ever
May you please provide more information on how you calling Toast-swift library (the calling site)?

@mehulparmar4ever
Copy link
Author

mehulparmar4ever commented Feb 20, 2024

@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)
}

Screenshot 2024-02-20 at 12 27 07 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants