Second encapsulation of AFNetworking + MBProgressHUD, one-sentence handling of network prompts, mbprogresshud Encapsulation
The second encapsulation of AFNetworking + MBProgressHUD is more convenient to use and has a strong Applicability: Get the network prompt in one sentence;
There is no need to worry about modifying the project many times after the network library is updated! The Network Library only needs to update the encapsulated library. Correction of deficiencies
Usage:
[MBProgressHUD showAutoMessage: @ "auto disappear"];
[MBProgressHUD showMessage: @ "plain text, not automatically disappear" ToView: self. view];
[MBProgressHUD showMessage: @ "plain text, automatically disappears after X seconds" ToView: self. view RemainTime: 3];
[MBProgressHUD showCustomIcon: @ "talk_gift.png" Title: @ "custom image" ToView: self. view];
[MBProgressHUD showIconMessage: @ "Default graph, automatically disappears after X seconds" ToView: self. view RemainTime: 3];
[MBProgressHUD showError: @ "Download failed" ToView: self. view]; [MBProgressHUD showSuccess: @ "Download complete" ToView: self. view];
Source Code address: https://github.com/NegHao/NHNetworkHelper if you think good, give like