• ios状态栏调整 简单动画的知识点


    首先状态栏式view的属性,所以在viewController中直接重写:

    /** 修改状态栏 */
    - (UIStatusBarStyle)preferredStatusBarStyle
    {
        // 修改状态栏的颜色(白色)
        return UIStatusBarStyleLightContent;
    }
    // 这种返回值没有*的说明不是对象,那么不是枚举就是结构体,大多数情况是枚举,所以取值也比较简单,一般是返回值后边加上状态;

    在UIKit学习中常用的块动画:

    // 块动画 animateWithDuration:时间 animations:block代码
    
    [UIView animateWithDuration:2.3 animations:^{
            // 动画代码
        } completion:^(BOOL finished){
            // 动画完成时的代码,一般是释放内存子类的代码
            [downloadStateLabel removeFromSuperview];
        }];

    还有一种是首位式动画:前面的博客里也由简绍到首位式动画的代码;

        // 动画效果
        // 动画效果完成之后,将Label从视图中删除
        // 首尾式动画,只能做动画,要处理完成后的操作不方便
        //    [UIView beginAnimations:nil context:nil];
        //    [UIView setAnimationDuration:1.0];
        //    label.alpha = 1.0;
        //    [UIView commitAnimations];
  • 相关阅读:
    sql
    java常见异常
    call的用法及NodeList与Array的区别
    os模块
    random模块
    time模块
    序列化模块
    模块介绍
    内置函数
    匿名函数-lambda
  • 原文地址:https://www.cnblogs.com/cxbblog/p/3763339.html
Copyright © 2020-2023  润新知