RTLoading是一个扩展程序,它允许您轻松地将载入指示器添加到任何视图中。
#import <UIView+RTLoading.h>
/**
* Set configuration of loading view
* if was set nil then will set default value
*
* @param image Image of indicator. Max size is 40x40.
* @param indicatorColor Color of indicator image. If color is clear then will
* not be set tint of color of image. Default: nil.
* @param areaColor Color of area under indicator. Default: whiteColor.
* @param areaBorderColor Color of area border. Default: clearColor.
* @param backgrounColor Color of view which will block content.
* Default: clearColor.
*/
+ (void)rt_configWithImage:(UIImage *_Nullable)image
indicatorColor:(UIColor *_Nullable)indicatorColor
areaColor:(UIColor *_Nullable)areaColor
areaBorderColor:(UIColor *_Nullable)areaBorderColor
backgrounColor:(UIColor *_Nullable)backgrounColor;
/**
* Show loading view
*/
- (void)rt_showLoading;
/**
* show loading view with custom configuration
* if was set nil then will set default value
*
* @param image Image of indicator. Max size is 40x40.
* @param indicatorColor Color of indicator image. If color is clear then will
* not be set tint of color of image. Default: nil.
* @param areaColor Color of area under indicator. Default: whiteColor.
* @param areaBorderColor Color of area border. Default: clearColor.
* @param backgrounColor Color of view which will block content.
* Default: clearColor.
*/
- (void)rt_showLoading:(UIImage *_Nullable)image
indicatorColor:(UIColor *_Nullable)indicatorColor
areaColor:(UIColor *_Nullable)areaColor
areaBorderColor:(UIColor *_Nullable)areaBorderColor
backgrounColor:(UIColor *_Nullable)backgrounColor;
/**
* Hide loading view
*/
- (void)rt_hideLoading;
/**
* Hide loading view without animation
*/
- (void)rt_fastHideLoading;
RTDataSourceAdapter可以通过CocoaPods获得。要安装它,只需将以下行添加到您的Podfile中
pod install 'RTLoading'
如果您不想使用CocoaPods,只需将src文件夹复制到您的Xcode项目中。
RTLoading采用MIT许可证。有关更多信息,请参阅LICENSE文件。