FTIndicator 1.2.9

FTIndicator 1.2.9

测试已测试
语言语言 Obj-CObjective C
许可 MIT
发布最新发布2018年5月

liufengting 维护。



FTIndicator

FTIndicator

Twitter GitHub license Version Platform Download CocoaPods CocoaPods CI Status GitHub stars

一个轻量级的UI工具包,包含本地通知、进度HUD、吐司,支持模糊效果优雅API主题支持,灵感来源于苹果的进程HUD、通知和Android的吐司。

三合一

  • 如果您想使用所有三种指示器,请使用 FTIndicator
  • 此外,FTNotificationIndicatorFTProgressIndicatorFTToastIndicator 可以独立工作。您可以根据需要使用它们。

FTIndicator

FTNotificationIndicator FTProgressIndicator FTToastIndicator


屏幕截图

纵向

风格 浅色 暗色
通知
进度
吐司

横幅

风格 浅色 暗色
通知
进度
吐司

安装

手动

  • 克隆此仓库。
  • 简单地将 '/FTIndicator' 文件夹拖到您的项目中。
  • 导入 'FTIndicator.h'

CocoaPods

FTIndicator 通过 CocoaPods 可用。要安装它,只需将以下行添加到您的 Podfile 中

⚠️注意:

1.2.2 版本的语法错误修复:语法错误已修复。可能会影响您的项目,请谨慎更新。

⚠️注意:

1.2.0 版本的重大修复:当应用程序启动时进度 HUD 不显示

FTNotificationIndicatorFTProgressIndicatorFTToastIndicator 在 v1.1.5 后停止更新 podfile。如果您想单独使用它们,您应该在 Podfile 中将其作为 subPod 使用,如下所示

    pod 'FTIndicator/FTNotificationIndicator'
    pod 'FTIndicator/FTProgressIndicator'
    pod 'FTIndicator/FTToastIndicator'

使用 FTIndicator,三个都使用

  • FTIndicator,三合一
pod 'FTIndicator'

分别使用

  • FTNotificationIndicator

pod 'FTNotificationIndicator' 已不再可用,请使用这个

# use as a subPod

pod 'FTIndicator/FTNotificationIndicator'
  • FTProgressIndicator

pod "FTProgressIndicator" 已不再可用,请使用这个

# use as a subPod

pod 'FTIndicator/FTProgressIndicator'
  • FTToastIndicator

pod 'FTToastIndicator' 已经不可用,使用这个

# use as a subPod

pod 'FTIndicator/FTToastIndicator'

用法

使用 FTIndicator

通知

  • 无图片显示
[FTIndicator showNotificationWithTitle:@"Here is a notification title."
								message:@"Here is a notification message."]; 
  • 显示图片
[FTIndicator showNotificationWithImage:[UIImage imageNamed:@"maps_icon"]
								   title:@"Here is a notification title."
                               message:@"Here is a notification message."]; 
  • 显示图片,带有点击处理程序和完成处理程序
[FTIndicator showNotificationWithImage:[UIImage imageNamed:@"maps_icon"]
                                 title:@"Here is a notification title."
                               message:@"Here is a notification message. Try to tap and see tap handling or do nothing to see completion"
                            tapHandler:^{
							// handle user tap
                            } completion:^{
							// handle completion
                            }];
  • 手动消失
[FTIndicator dismissNotification];

进度

  • 显示进度
[FTIndicator showProgressWithMessage:@"Here is a progress message."];  
// or disable user interactions

[FTIndicator showProgressWithMessage:@"Here is a progress message." userInteractionEnable:NO]; 
  • 显示成功
[FTIndicator showSuccessWithMessage:@"Here is a success message."]; 
// or disable user interactions

[FTIndicator showSuccessWithMessage:@"Here is a success message." userInteractionEnable:NO]; 
  • 显示信息
[FTIndicator showInfoWithMessage:@"Here is a info message."]; 
// or disable user interactions

[FTIndicator showInfoWithMessage:@"Here is a info message." userInteractionEnable:NO]; 
  • 显示错误
[FTIndicator showErrorWithMessage:@"Here is a error message."];
// or disable user interactions

[FTIndicator showErrorWithMessage:@"Here is a error message." userInteractionEnable:NO];
  • 手动消失
[FTIndicator dismissProgress];

吐司

  • 显示图片
[FTIndicator showToastMessage:@"Short Toast."];  
  • 手动消失
[FTIndicator dismissToast];

单独使用 FTNotificationIndicatorFTProgressIndicatorFTToastIndicator

FTNotificationIndicator

  • 显示图片
[FTNotificationIndicator showNotificationWithImage:[UIImage imageNamed:@"maps_icon"]
                                             title:@"Here is a notification title."
                                           message:@"Here is a notification message."]; 
  • 无图片显示
[FTNotificationIndicator showNotificationWithTitle:@"Here is a notification title."
										     message:@"Here is a notification message."]; 
  • 手动消失
[FTNotificationIndicator dismiss];

FTProgressIndicator

  • 显示进度
[FTProgressIndicator showProgressWithmessage:@"Here is a progress message."]; 
// or disable user interactions
[FTProgressIndicator showProgressWithmessage:@"Here is a progress message." userInteractionEnable:NO]; 
  • 显示成功
[FTProgressIndicator showSuccessWithMessage:@"Here is a success message."]; 
// or disable user interactions
[FTProgressIndicator showSuccessWithMessage:@"Here is a success message." userInteractionEnable:NO]; 
  • 显示信息
[FTProgressIndicator showInfoWithMessage:@"Here is a info message."]; 
// or disable user interactions
[FTProgressIndicator showInfoWithMessage:@"Here is a info message." userInteractionEnable:NO]; 
  • 显示错误
[FTProgressIndicator showErrorWithMessage:@"Here is a error message."];
// or disable user interactions
[FTProgressIndicator showErrorWithMessage:@"Here is a error message." userInteractionEnable:NO];
  • 手动消失
[FTProgressIndicator dismiss];

FTToastIndicator

  • 显示图片
[FTToastIndicator showToastMessage:@"Short Toast."];  
  • 手动消失
[FTToastIndicator dismiss];

CHANGELOG

变更日志

License

FTIndicator可在MIT许可下使用。有关更多信息,请参阅LICENSE文件。