Wrong way:
self.notificationButton.titleLabel.text=[NSString stringWithFormat:@"%i",notificationCount];
Correct way:
[self.notificationButton setTitle:[NSString stringWithFormat:@"%i",notificationCount] forState:UIControlStateNormal];
By setting in a wrong way, title changed to default (set using storyboard) when user will click
No comments:
Post a Comment