12345678910111213141516171819202122232425262728293031323334353637 |
- import Foundation
- extension NotificationCenter {
- func postOnMainThread(name: String, object anObject: Any? = nil, userInfo aUserInfo: [AnyHashable : Any]? = nil) {
- DispatchQueue.main.async {
- NotificationCenter.default.post(name: Notification.Name.init(rawValue: name), object: anObject, userInfo: aUserInfo)
- }
- }
- }
|