Can I use a background thread to parse data?

后端 未结 4 1846
闹比i
闹比i 2021-01-07 10:35

I\'m using chcsvparser to parse data from a csv file on my apps launch. It\'s taking way too long to startup on main thread so I was thinking of doing this on the backgroun

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-07 11:13

    It is better to use NSOperation class to do that job. You can find a nice example named "LazyTableImages" at XCode documentation. It is uses a NSOperation to parse a XML

提交回复
热议问题