FTToastIndicator 1.2.9

FTToastIndicator 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、Toast,包含模糊效果优雅的 API主题支持,受 Apple 的进程 HUD、通知和 Android 的 Toast 启发。

3 IN 1

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

FTIndicator

FTNotificationIndicator FTProgressIndicator FTToastIndicator


屏幕截图

纵向

样式 浅色 深色
通知
进度
Toast

风景模式

样式 浅色 深色
通知
进度
Toast

安装

手动

  • 克隆此存储库。
  • 只需将 '/FTIndicator' 文件夹拖入你的项目中。
  • 导入 'FTIndicator.h'

CocoaPods

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

⚠️注意:

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

⚠️注意:

1.2.0版本主要修复:应用启动时进度HUD不显示

FTNotificationIndicatorFTProgressIndicatorFTToastIndicator在v1.1.5后不再更新Podfile。如果您想单独使用它们,请在Podfile中像下面这样使用它们作为一个子Pod

    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

变更日志

许可证

FTIndicator遵循MIT许可证。更多详情请见LICENSE文件。