我发现下面的代码片段允许NSNotification从任何后台线程发布到主线程。我想知道这是否是一种安全且可接受的做法?dispatch_async(dispatch_get_main_queue(),^{[[NSNotificationCenterdefaultCenter]postNotificationName:@"ImageRetrieved"object:niluserInfo:imageDict];}); 最佳答案 是的,你可以。通常,您希望在main上发送NSNotifications,尤其是当它们触发UI事件(例如关