• ios中图层的用法(1)


    uiview画圆角

    - (void)layerMyView {
        // 圆角
        self.myview.layer.cornerRadius = 10;
        // 边框
        self.myview.layer.borderWidth = 5;
        self.myview.layer.borderColor = [UIColor redColor].CGColor;
        // 阴影
        self.myview.layer.shadowOffset = CGSizeMake(-10, 10);
        self.myview.layer.shadowColor = [UIColor blueColor].CGColor;
        self.myview.layer.shadowOpacity = 0.5;
    }

    uiImageview画圆角

        // 圆角
    //    self.imageView.layer.cornerRadius = 30;
    //    // 让内部的所有子层都跟随最外面的边界(这个属性为YES,不能有阴影)
    //    self.imageView.layer.masksToBounds = YES;
    //    // 边框
    //    self.imageView.layer.borderWidth = 5;
    //    self.imageView.layer.borderColor = [UIColor blueColor].CGColor;
    //    // 阴影
    //    self.imageView.layer.shadowOffset = CGSizeMake(-10, 10);
    //    self.imageView.layer.shadowColor = [UIColor redColor].CGColor;
    //    self.imageView.layer.shadowOpacity = 0.5;
    动画  

    // 形变 //self.imageView.layer.transform = CATransform3DMakeScale(0.5, 0.5, 0); //self.imageView.layer.transform = CATransform3DMakeRotation(M_PI_4, 1, 1, 0); //[self.imageView.layer setValue:[NSValue valueWithCATransform3D:CATransform3DMakeRotation(M_PI_4, 1, 1, 0)] forKeyPath:@"transform"]; // 搜索CATransform3D [self.imageView.layer setValue:@0.7 forKeyPath:@"transform.scale.x"];
  • 相关阅读:
    linux IP设置
    .net 5 json 序列化时间格式设置
    protobuf 到json的互转
    xml/json/protobuf转换时 ipv4 ipv6的特殊处理
    路由fib 数据结构
    protobufc xml 互转
    k/v/malloc
    skb相关路由信息
    shell 脚本
    考研级《计算机网络》知识梳理——第十六期
  • 原文地址:https://www.cnblogs.com/gcb999/p/3189151.html
Copyright © 2020-2023  润新知