Does Apple not allow developers to add an icon into a status bar?
I followed code from a book. The code is simple:
@interface UIApplication (extended)
- (void) addStatusBarImageNamed:(NSString *)aName;
- (void) removeStatusBarImageNamed:(NSString *)aName;
@end
- (void)performAction{
if (xxx) {
[[UIApplication sharedApplication]addStatusBarImageNamed:@"Default_EN.png"];
}
else {
[[UIApplication sharedApplication]addStatusBarImageNamed:@"Default_EC.png"];
}
}
But it gives the following feedback :
-addStatusBarImageNamed: is deprecated. Doing nothing.
What can I do?
In Classes/YourViewController.m, the addStatusBarImageNamed:removeOnExit: method needs to be overwritten with this.
See if it works fine.