Code:
Rootviewcontroller.m
#import"RootViewController.h"@interfaceRootviewcontroller ()@end@implementationrootviewcontroller-(ID) Initwithnibname: (NSString *) Nibnameornil Bundle: (NSBundle *) nibbundleornil{self =[Super Initwithnibname:nibnameornil Bundle:nibbundleornil];If(self) {//Custom initialization}ReturnSelf;} - (void) viewdidload{[Super Viewdidload];//Do any additional setup after loading the view.self.title=@"Uistatus";//Animation effect [UIView animatewithduration:3 animations:^{[Self setneedsstatusbarappearanceupdate];}];} - (void) didreceivememorywarning{[Super didreceivememorywarning];// Dispose of any of the resources that can be recreated. } #pragma mark IOS 7 Uistatusbar // animation effect- ( uistatusbaranimation) preferredstatusbarupdateanimation{return Uistatusbaranimationfade;} // style- (Uistatusbarstyle) preferredstatusbarstyle{return Uistatusbarstyledefault;} // Show and hide- (BOOL) prefersstatusbarhidden{return FALSE;} @end
"Code Note" Ios-ios7 StatusBar