iOSアプリ開発のメモ置き場

ささたつがiOSアプリ開発で知ったObjective-Cのtipsなどを書いていく所存

アイコンやタブにバッジを表示するには?

アイコンにバッジを表示する。

// int を指定する
[UIApplication sharedApplication].applicationIconBadgeNumber = 10;


タブにバッジを表示する。

// NSString を指定する
self.navigationController.tabBarItem.badgeValue = [NSString stringWithFormat:@"%d", 10];