Afnetworking Network Library has provided a good picture caching mechanism, the efficiency is relatively high, but I found that there is no direct provision of the ability to clear the cache, the project usually need to add
The functionality of the function is cleared, so here I add the following purge function method to the Uiimageview+afnetworking class:
[OBJC]View Plaincopyprint?
- /**
- Clear Image Cache
- Author:huangyibiao
- */
- + (void) ClearCache;
[OBJC]View Plaincopyprint?
- /**
- Clear Image Cache
- Author:huangyibiao
- */
- + (void) ClearCache {
- Afimagecache *cache = (afimagecache *) [Uiimageview Sharedimagecache];
- [Cache removeallobjects];
- return;
- }
Just beginning to contact AFN, found that chrysanthemum always do not turn, the results Baidu does not come out, then simply use ASI,
Today there is time to specialize in AFN, read the API inside, only to find that by default the AFN turns the Chrysanthemum is closed,
Need to be opened manually to be able to display the loop, open the method is:
[OBJC]View Plaincopyprint?
- [Afnetworkactivityindicatormanager Sharedmanager]. Enabled = YES;
You can add this method in Appdelegate
Original URL: http://blog.csdn.net/woaifen3344/article/details/41211745
AFN clear picture cache and Daisy circles