Are there any standard way to implement the “blue badge” in iPhone?

后端 未结 5 1274
故里飘歌
故里飘歌 2020-12-22 20:39

A lot of iPhone apps use a blue badge to indicate the number of items in the subviews, such as the Mail client:

iPhoto http://img.skitch.com/20081103-tjr9yupbhgr3sqf

5条回答
  •  误落风尘
    2020-12-22 21:09

    There is also another type of badge that you might already know, it's the "red" one that is on the application icon. They are created by doing something like:

    NSDate *now = [NSDate dateWithTimeIntervalSinceNow:0];
    NSString *caldate = [[now 
            dateWithCalendarFormat:@"%b" 
            timeZone:nil] description];
    [self setApplicationBadge:caldate];"
    

    this will set the badge with a 3 letter abbreviation for the current month.

提交回复
热议问题