简体   繁体   中英

Local Database Parse Xcode

I have an application in Xcode, and the application linked a database on Parse .. It brings news from Parse and displays it in TableView ..

But the problem is, if the user had lost contact with the Internet, it does not display anything, just a white screen I want to show me the latest news that have appeared since the last connection

Parse has a good way to cache data if the connection is lost. Try adding:

query.cachePolicy = kPFCachePolicyNetworkElseCache;

to your query and run it. First with and then without connection. This is a good guide that explains it a little bit deeper: https://parse.com/docs/osx/api/Constants/PFCachePolicy.html

Cheers!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM