//
// 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

UI1_Calayer的更多相关文章

随机推荐

  1. 暂时解决Sublime Text 2不支持input问题(转)

    (1)打开当前python文件 (2)然后 Tools -> Command Palette (3)SublimeREPL Python RUN current file (4)就会打开新窗口, ...

  2. centos 7 没有ifconfig 命令

    centos 7 没有ifconfig 命令: 安装命令: yum install net-tools

  3. MySQL · 特性分析 · 内部临时表

    http://mysql.taobao.org/monthly/2016/06/07/#rd MySQL中的两种临时表 外部临时表 通过CREATE TEMPORARY TABLE 创建的临时表,这种 ...

  4. 汇编中 .fill 的作用

    .fill     语法:.fill repeat, size, value    含义是反复拷贝 size个字节,重复 repeat 次,        其中 size 和 value 是可选的,默 ...

  5. Asp.Net 之 母版页中对控件ID的处理

    一.问题提出 由于总体排版和设计的需要,我们往往创建母版页来实现整个网站的统一性,最近我由于统一性的需要,把原来整个项目单独的页面全部套用了母版页.但是出现了一系列失效错误. 二. 抽象模型 由于整个 ...

  6. Keywords Search

    Keywords Search Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  7. cocos2d-x lua table数据存储

    cocos2d-x lua table数据存储 version: cocos2d-x 3.6 1. 将table转为json http://blog.csdn.net/songcf_faith/art ...

  8. 【Shell脚本学习14】Shell echo命令

    echo是Shell的一个内部指令,用于在屏幕上打印出指定的字符串.命令格式: echo arg 您可以使用echo实现更复杂的输出格式控制. 显示转义字符 echo "\"It ...

  9. Crosswalk入门

    Crosswalk入门 CSDN资讯:Crosswalk的介绍 Crosswalk官方地址 上面的链接可以看到Crosswalk的介绍,Crosswalk种种吹牛逼的描述我就不写了.写一下我的使用感受 ...

  10. iOS 项目审核被拒原因汇总

    1.程序运行崩溃 Your app crashes on iPhone running iOS connected to an IPv6 network when we: - app crashes ...