NSManagedObjectContext在后台线程上保存通知

时间:2015-08-09 18:14:29

标签: macos cocoa nsmanagedobjectcontext

我在后台线程中有NSManagedObjectContext。当主线程中的上下文保存背景线程中的上下文时,不知道它。 我尝试在主上下文中使用NSManagedObjectContextDidSaveNotification,但后来我无法在后台线程中运行marge方法。吼叫是我的代码。

<div class="panel panel-default">
    <div class="panel-footer">
        <form>
            <div class="input-group">
                <input id="address" type="email" placeholder="Add your email address" class="form-control">
                <span class="input-group-btn">
                    <button class="btn btn-default" type="button" id="addressSearch" style="background-color:#8c6666 "><font color="#ffffff" >Subscribe</font></button>
                </span>
            </div>
        </form>
    </div>
</div>

你能问我如何在正确的线程中运行merge方法。

0 个答案:

没有答案