####Swift版本请戳此处>>>
/*
您只需要调用一行代码,既可完成提示信息显示
*/
/*
中间显示
*/
[XHToast showCenterWithText:@"您要显示的提示信息"];
/*
上方显示
*/
[XHToast showTopWithText:@"您要显示的提示信息"];
/*
下方显示
*/
[XHToast showBottomWithText:@"您要显示的提示信息"];
#pragma mark-中间显示
/**
* 中间显示+自定义停留时间
*
* @param text 内容
* @param duration 停留时间
*/
+ (void)showCenterWithText:(NSString *)text duration:(CGFloat)duration;
#pragma mark-上方显示
/**
* 上方显示+自定义停留时间
*
* @param text 内容
* @param duration 停留时间
*/
+ (void)showTopWithText:(NSString *)text duration:(CGFloat)duration;
/**
* 上方显示+自定义距顶端距离
*
* @param text 内容
* @param topOffset 到顶端距离
*/
+ (void)showTopWithText:(NSString *)text topOffset:(CGFloat)topOffset;
/**
* 上方显示+自定义距顶端距离+自定义停留时间
*
* @param text 内容
* @param topOffset 到顶端距离
* @param duration 停留时间
*/
+ (void)showTopWithText:(NSString *)text topOffset:(CGFloat)topOffset duration:(CGFloat)duration;
#pragma mark-下方显示
/**
* 下方显示+自定义停留时间
*
* @param text 内容
* @param duration 停留时间
*/
+ (void)showBottomWithText:(NSString *)text duration:(CGFloat)duration;
/**
* 下方显示+自定义距底端距离
*
* @param text 内容
* @param bottomOffset 距底端距离
*/
+ (void)showBottomWithText:(NSString *)text bottomOffset:(CGFloat)bottomOffset;
/**
* 下方显示+自定义距底端距离+自定义停留时间
*
* @param text 内容
* @param bottomOffset 距底端距离
* @param duration 停留时间
*/
+ (void)showBottomWithText:(NSString *)text bottomOffset:(CGFloat)bottomOffset duration:(CGFloat)duration;
- 1.将 XHToast 文件夹添加到工程目录中
- 2.导入 XHToast.h
- 1.在 Podfile 中添加 pod 'XHToast'
- 2.执行 pod install 或 pod update
- 3.导入 XHToast.h
- 如果你发现你执行
pod install
后,导入的不是最新的,请删除Podfile.lock
文件,在执行一次pod install
- 该项目最低支持 iOS 7.0 和 Xcode 7.0
XHToast 使用 MIT 许可证,详情见 LICENSE 文件