We often run into status indicators when using microblogs, and wonder what it does? This article is a few lines of code to achieve the Easy-to-use status bar indicator.
Microblog number Reminder box for Weibo project
/** reminder of the latest microblog number/
-(void) Shownewstatuscount: (Nsinteger) Count
{
if (count) {[
Xzmstatusbarhud Sharedxzmstatusbarhud] shownormal:[nsstring stringwithformat:@ "has%ld new Weibo", Count] position:64 animadelay:0 configuration:^{
/** settings need to be added to which view/
[Xzmstatusbarhud sharedxzmstatusbarhud].formview = Self.view;
}];
else {[
xzmstatusbarhud Sharedxzmstatusbarhud] shownormal:@ "No new microblogging data" position:64 animadelay:0 configuration:^{
/** settings need to be added to which view/
[Xzmstatusbarhud sharedxzmstatusbarhud].formview = Self.view;
}];
}
}
Load the background color of the reminder box successfully set
[[Xzmstatusbarhud Sharedxzmstatusbarhud] showsuccess:@ ' Load succeeded ' position:0 animadelay:0 configuration:^ () {
/** Set transparency * *
[Xzmstatusbarhud sharedxzmstatusbarhud].statusalpha = 0.7;
/** set the background color of the reminder box * *
[Xzmstatusbarhud sharedxzmstatusbarhud].statuscolor = [Uicolor bluecolor];
Position: The position of the reminder section of the status bar can be set the default value is 0
animadelay: You can set the duration of the animation, 0 represents the default value: 1.0
Loading and setting the background color of the reminder box
[[Xzmstatusbarhud Sharedxzmstatusbarhud] showloading:@ "in load ..." position:0 animadelay:0 configuration:^ () {
/** sets the background color of the reminder box */
[Xzmstatusbarhud sharedxzmstatusbarhud].statuscolor = [Uicolor redcolor];
}];
Position: The position of the reminder section of the status bar can be set the default value is 0
animadelay: You can set the duration of the animation, 0 represents the default value: 1.0
Implementation of the effect is not very interesting, the above is to implement the status indicator of the corresponding code, I hope to help you learn.