SGNavigationProgress 1.2

SGNavigationProgress 1.2

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最后发布2014年12月

未指明维护。



  • 作者:
  • Shawn Gryschuk

UINavigationBar 上显示类似 Safari 进度视图的分类 SGNavigationProgress SGNavigationProgress With Mask

安装

Cocoapods: pod 'SGNavigationProgress'

手动:将 UINavigationController+SGProgress.h 和 UINavigationController+SGProgress.m 添加到您的项目中,并导入 .h 文件

使用

设置持续时间

[self.self.navigationController showSGProgress]; //默认为3秒 [self.navigationController showSGProgressWithDuration:3]; //使用navbar的tintColor [self.navigationController showSGProgressWithDuration:3 andTintColor:[UIColor blueColor]; [self.navigationController showSGProgressWithDuration:3 andTintColor:[UIColor blueColor] andTitle:@"发送..."]; [self.navigationController showSGProgressWithMaskAndDuration:3]; [self.navigationController showSGProgressWithMaskAndDuration:3 andTitle:@"发送..."];

[self.navigationController finishSGProgress]; //提前结束动画

自定义百分比

- (void)setSGProgressPercentage:(float)percentage; - (void)setSGProgressPercentage:(float)percentage andTitle:(NSString *)title; - (void)setSGProgressPercentage:(float)percentage andTintColor:(UIColor *)tintColor; - (void)setSGProgressMaskWithPercentage:(float)percentage; - (void)setSGProgressMaskWithPercentage:(float)percentage andTitle:(NSString *)title;

[SVHTTPRequest POST:URL parameters:@{} progress:^(float progress) {[self.navigationController setSGProgressPercentage:progress * 100];} completion:^(id response, NSHTTPURLResponse *urlResponse, NSError *error) {}];

许可证

MIT 许可证