CocoaPods trunk is moving to be read-only. Read more on the blog, there are 10 months to go.
| TestsTested | ✗ |
| LangLanguage | Obj-CObjective C |
| License | MIT |
| ReleasedLast Release | Mar 2017 |
Maintained by liyang.
| Depends on: | |
| SDWebImage | ~> 3.7.3 |
| Reachability | ~> 3.2 |
To run the example project, clone the repo, and run pod install from the Example directory first.
First, this step is necessary.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
[LYWebImageSwitch registeWebImageSwitch];
return YES;
}It's helpful to reset the download setting.
then, you can use
+ (void)setWebImageSwitch:(BOOL)webImageSwitch;and
+ (BOOL)webImageSwitch;to set or get the state of switch.
Note: only in WWAN. It's always allowed to download web image in WLAN.
Note: SDWebImage have caches. It will cause web image can appear again.
Note: If you want images disappear after clearing caches, you must reload the views.
Because the simulator have only WLAN, for better to see the result, I make it can work in WLAN in the IPHONE_SIMULATOR.
Same to SDWebImage.
LYWebImageSwitch is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "LYWebImageSwitch"liyang, [email protected]
LYWebImageSwitch is available under the MIT license. See the LICENSE file for more info.