zoukankan      html  css  js  c++  java
  • UI1_Calayer

    //
    //  ViewController.m
    //  UI1_Calayer
    //
    //  Created by zhangxueming on 15/7/2.
    //  Copyright (c) 2015年 zhangxueming. All rights reserved.
    //
    
    #import "ViewController.h"
    
    @interface ViewController ()
    
    @end
    //图层
    //CALayer就是图层, 图层的功能是渲染图片和播放动画等, 每当创建一个UIView的时候,系统会自动创建一个CALayer, 但是这个CALayer对象你不能改变, 只能修改某些属性.所以通过修改CALayer,不仅可以修饰UIView的外观, 还可以给UIView添加各种动画. CALayer属于CoreAnimation框架中的类;
    //CALayer 每个View都有一个CALayer属性, 每个View都附着在一个层上。
    @implementation ViewController
    
    - (void)viewDidLoad {
        [super viewDidLoad];
        // Do any additional setup after loading the view, typically from a nib.
        UIView *view = [[UIView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
        view.backgroundColor = [UIColor redColor];
        
        view.layer.cornerRadius = 15;
        
        view.layer.borderWidth = 10;
        
        [self.view addSubview:view];
        
    }
    
    - (void)didReceiveMemoryWarning {
        [super didReceiveMemoryWarning];
        // Dispose of any resources that can be recreated.
    }
    
    @end
    
  • 相关阅读:
    时间安排还是很不合理
    ZOJ Problem Set
    ZOJ Problem Set
    ZOJ Problem Set
    ZOJ Problem Set
    还是很水啊!!!
    pragma mark
    IOS应用发布NSLog的如何注释
    设定时间让应用从后台回来是否重新启动应用
    Mac 上SVN上传.a文件
  • 原文地址:https://www.cnblogs.com/0515offer/p/4638528.html
Copyright © 2011-2022 走看看