XZMStatusBarHUD

(logo)
非常方便易用的狀態(tài)欄指示器(比如微博項(xiàng)目的微博數(shù)提醒框僅需幾行代碼)
- 比如微博項(xiàng)目的微博數(shù)提醒框僅需幾行代碼
微博項(xiàng)目的微博數(shù)提醒框

(logo)
- 錄制時(shí)由于圖片的質(zhì)量部是很好,其實(shí)沒(méi)有后面的浮動(dòng)的背景
/** 提醒最新微博數(shù)量 */
- (void)showNewStatusCount:(NSInteger)count
{
if (count) {
[[XZMStatusBarHUD sharedXZMStatusBarHUD] showNormal:[NSString stringWithFormat:@"有%ld條新的微博" ,count] position:64 animaDelay:0 configuration:^{
/** 設(shè)置需要添加到哪個(gè)View上 */
[XZMStatusBarHUD sharedXZMStatusBarHUD].formView = self.view;
}];
} else {
[[XZMStatusBarHUD sharedXZMStatusBarHUD] showNormal:@"沒(méi)有新的微博數(shù)據(jù)" position:64 animaDelay:0 configuration:^{
/** 設(shè)置需要添加到哪個(gè)View上 */
[XZMStatusBarHUD sharedXZMStatusBarHUD].formView = self.view;
}];
}
}
加載成功 設(shè)置提醒框的背景顏色

(logo)
[[XZMStatusBarHUD sharedXZMStatusBarHUD] showSuccess:@"加載成功" position:0 animaDelay:0 configuration:^() {
/** 設(shè)置透明度 */
[XZMStatusBarHUD sharedXZMStatusBarHUD].statusAlpha = 0.7;
/** 設(shè)置提醒框的背景顏色 */
[XZMStatusBarHUD sharedXZMStatusBarHUD].statusColor = [UIColor blueColor];
}];
position:可設(shè)置狀態(tài)欄的提醒款的位置 默認(rèn)值為0
animaDelay:可以設(shè)置動(dòng)畫的持續(xù)時(shí)間, 0代表默認(rèn)值:1.0
加載錯(cuò)誤 并設(shè)置文字富文本屬性

(logo)
[[XZMStatusBarHUD sharedXZMStatusBarHUD] showError:@"加載錯(cuò)誤" position:0 animaDelay:0 configuration:^() {
/** 設(shè)置透明度 */
[XZMStatusBarHUD sharedXZMStatusBarHUD].statusAlpha = 1.0;
/** 設(shè)置提醒框高度 */
[XZMStatusBarHUD sharedXZMStatusBarHUD].statusH = 40;
/** 設(shè)置文字富文本屬性 */
NSMutableDictionary *dict = @{}.mutableCopy;
dict[NSFontAttributeName] = [UIFont systemFontOfSize:16];
dict[NSForegroundColorAttributeName] = [UIColor redColor];
[XZMStatusBarHUD sharedXZMStatusBarHUD].attributedText = dict;
}];
position:可設(shè)置狀態(tài)欄的提醒款的位置 默認(rèn)值為0
animaDelay:可以設(shè)置動(dòng)畫的持續(xù)時(shí)間, 0代表默認(rèn)值:1.0
正在加載中 并設(shè)置提醒框的背景顏色

(logo)
[[XZMStatusBarHUD sharedXZMStatusBarHUD] showLoading:@"正在加載中..." position:0 animaDelay:0 configuration:^() {
/** 設(shè)置提醒框的背景顏色 */
[XZMStatusBarHUD sharedXZMStatusBarHUD].statusColor = [UIColor redColor];
}];
position:可設(shè)置狀態(tài)欄的提醒款的位置 默認(rèn)值為0
animaDelay:可以設(shè)置動(dòng)畫的持續(xù)時(shí)間, 0代表默認(rèn)值:1.0
隱藏提醒框

(logo)
[[XZMStatusBarHUD sharedXZMStatusBarHUD] hidden];
普通文字加載 并設(shè)置提醒框的背景圖

(logo)
[[XZMStatusBarHUD sharedXZMStatusBarHUD] showNormal:@"普通文字加載" position:0 animaDelay:0 configuration:^() {
/** 設(shè)置提醒框高度 */
[XZMStatusBarHUD sharedXZMStatusBarHUD].statusH = 48;
/** 設(shè)置文字富文本屬性 */
NSMutableDictionary *dict = @{}.mutableCopy;
dict[NSFontAttributeName] = [UIFont systemFontOfSize:20];
dict[NSForegroundColorAttributeName] = [UIColor brownColor];
[XZMStatusBarHUD sharedXZMStatusBarHUD].attributedText = dict;
/** 設(shè)置提醒框的背景圖片 */
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"friendsTrend_login"]];
[XZMStatusBarHUD sharedXZMStatusBarHUD].statusbackgroundView = imageView;
}];
position:可設(shè)置狀態(tài)欄的提醒款的位置 默認(rèn)值為0
animaDelay:可以設(shè)置動(dòng)畫的持續(xù)時(shí)間, 0代表默認(rèn)值:1.0
提供了非常多的實(shí)用接口

(logo)