objective c - How to load a UIDocument on the main queue? -
i used use plists store app's data, have decided use uidocument instead. first view uitableview, , corresponding uidocument needs loaded before view appears.
i load , save data in app's delegate, when load uidocument, gets loaded (on background queue, think) after table view appears, causing kinds of errors.
so, how load on main queue, when it's loaded program execution can continue normally? document isn't big (only contains data of array of string data), , there won't performance-related issues.
are using method -openwithcompletionhandler:
load document? if case, have reload table in completion block.
the document is loaded on main thread, later, table displayed.
Comments
Post a Comment