Skip to content

lonely4flow/TestLayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

TestLayer

####前言 开发中经常需要遇到对某个view的一个角或几个角进行圆角处理,而且由于使用Autolayout约束时frame可能会动态变化,每次都要单独写很多代码,现在写个分类简化这种操作

GitHub 代码

参考:


知识点: 1、在-(void)layoutSubviews{xxx}里获取bounds适配frame和autolayout变化的情况,同时缓存bounds减少重复操作 2、runtime方式在分类中实现getter setter 3、使用UIBezierPath CAShapeLayer设置UIView的layer.mask进行切角 4、

Simulator Screen Shot - iPhone Xʀ - 2019-04-19 at 16.24.57.png

Simulator Screen Shot - iPhone Xʀ - 2019-04-19 at 18.58.22.png

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages