(006)UITabBarItem badgeValue属性

-(id)init
{
    if(self = [super init])
    {
        self.title = @"first";
        //self.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"first" image:nil tag:0];
        //self.tabBarItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemBookmarks tag:0];
        UITabBarItem *tabBarItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemMostViewed tag:0];
        
        tabBarItem.badgeValue = @"苹果";
        self.tabBarItem = tabBarItem;
    }
    return self;
}

 

posted @ 2013-08-08 19:15  雪中飞雁  阅读(81)  评论(0)    收藏  举报