I am new IOS, i will like to know how save temporally NSMutableArray count sow i can compare with the new count?
i add badge icon on the app with the count and remove when i click to the new row, but when i refresh and add new row the add all the badge again.
This is the code:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:self.parseResults.count];
return self.parseResults.count;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSInteger badge = [[UIApplication sharedApplication] applicationIconBadgeNumber];
if (badge > 0) {
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:(badge - 1)];
}
}
Thank
// Above code is for saving…
and for retriving back this max count you can write below code where ever you want my friend
let me know it is working or not…
Happy Coding…!!!