ios - Multithreading in UITableView -
i'm new multithreading
.
i have uitableview
few rows. when select 1 row there action taking place in server. take time finish action. when want select other row in table takes time perform action, ie after 1st row finishes action row start action.
so want that, when 1st row selected , action preforming, , when select 2nd row , 1st row action should open new thread , run in thread, , after action completed should kill thread.
i want way happen rows in uitableview
.
can me solve issue. in advance.
read on grand central dispatch: http://www.raywenderlich.com/4295/multithreading-and-grand-central-dispatch-on-ios-for-beginners-tutorial
here basic example on setting thread:
dispatch_async( dispatch_get_global_queue(dispatch_queue_priority_default, 0), ^{ // add code here background processing // // dispatch_async( dispatch_get_main_queue(), ^{ // add code here update ui/send notifications based on // results of background processing }); });
Comments
Post a Comment