代码笔记iOS-ios7 StatusBar

Posted 菜鸟and小白

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了代码笔记iOS-ios7 StatusBar相关的知识,希望对你有一定的参考价值。

代码:

RootViewController.m

技术分享
#import "RootViewController.h"

@interface RootViewController ()

@end

@implementation RootViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.title=@"UIStatus";
    
    //动画效果
    [UIView animateWithDuration:3 animations:^{
        [self setNeedsStatusBarAppearanceUpdate];
    }];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark ios 7 UIStatusBar
//动画效果
-(UIStatusBarAnimation)preferredStatusBarUpdateAnimation
{
    return UIStatusBarAnimationFade;
}
//样式
-(UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleDefault;
}
//显示和隐藏
-(BOOL)prefersStatusBarHidden
{
    return FALSE;
}


@end
技术分享

以上是关于代码笔记iOS-ios7 StatusBar的主要内容,如果未能解决你的问题,请参考以下文章

iOS-iOS10极光推送的使用

statusBar状态栏_02

张高兴的 UWP 开发笔记:手机状态栏 StatusBar

Error: Couldn‘t perform atomic initializationSQLite. Compiled for 3.7.17, but running with 3.7.7(代码片

Android Parcelable反序列化报错笔记:java.lang.RuntimeException: Unmarshalling unknown type code at offset(代码片

The service already exists! The current server installed: D:mysqlmysql-5.7.30-winx64inmysqld My(代码片