ios - Swift - NSOperationQueue -
i have swift code (migrated obj-c)
nsoperationqueue().addoperationwithblock({ print("working...") nsoperationqueue.mainqueue().addoperationwithblock({ print("finished") }) }) the mainqueue block doesn't execute ("finished" never printed). what's wrong it?
this code fine , both operation block executing mainqueue operation block takes lil time execute because mainqueue adds block operation queue of main thread not guarantee when executed. there other items in queue still waiting execute.
ios objective-c swift
No comments:
Post a Comment