MuShare / EasyJapanese

Learn Japanese
MIT License
2 stars 1 forks source link

新闻列表页,显示新闻的已读未读状态 #10

Open yanyin1986 opened 5 years ago

yanyin1986 commented 5 years ago

利用 UserDefaults 简单实现新闻的已读未读状态。

引用

UserDefaults

https://www.jianshu.com/p/3796886b4953 https://www.jianshu.com/p/99660cadfe16

文集

https://www.jianshu.com/u/23dd8d9701bf

同步UserDefaults的时机

https://stackoverflow.com/questions/9647931/nsuserdefaults-synchronize-method

Waits for any pending asynchronous updates to the defaults database and returns;
This method is unnecessary and shouldn't be used.

好像这个方法过期了,不需要再主动调用了