开发者

Cache a JSON string from a URL Request

开发者 https://www.devze.com 2023-02-15 09:15 出处:网络
I have about 3 different requests which are made to a url which retrieve an extensive JSON string. I would like to store this in the cache in the event that the iPhone doe开发者_StackOverflow社区s not

I have about 3 different requests which are made to a url which retrieve an extensive JSON string. I would like to store this in the cache in the event that the iPhone doe开发者_StackOverflow社区s not have an internet connection at next launch.

What is the best method for this? I am fairly new to Objective-C and xCode. I have researched NSURLCache and NSCache, but not sure which I should use.

I would also like to know if there is a way to preload this JSON string in the background. Or at least show a preloader view. Two separate questions, I know.

Thanks for pointing me in the right direction.

0

精彩评论

暂无评论...
验证码 换一张
取 消