Latest 0.0.2
Homepage https://github.com/shevakuilin/SKArchCutter-Swift
License MIT
Platforms ios 8.0
Authors

简述

SKArchCutter-Swift是一个基于 Swift 的可自选切割角的圆角切割工具,同时支持UIView、UIImageView、UIButton和UILabel的单角切圆/选角拱形切圆/全角切圆,并且避免了UIImageView使用系统圆角所导致的离屏渲染的问题,以及确保layer对象的masksToBounds属性始终为NO,从而使得项目中大量使用圆角时的性能得到很大程度的优化, 最重要的是使用简单、方便。如果觉得还不错,star支持下吧~

SKArchCutter-Swift
SKArchCutter-Swift
![](https://img.shields.io/badge/language-Swift 4.2-purple.svg)
SKArchCutter-Swift

提示

  • 同时兼容SnaKit和frame布局

  • 支持使用border

  • 支持Swift 4.2, Objective-C版本

  • 注意:如果之前设置了borderbackgroundColor请取消,关闭masksToBounds(如果打开了话), 请在方法中进行设置

效果图

SKArchCutter-Swift

测试性能

SKArchCutter-Swift

如何开始

1.从GitHub上Clone–>SKArchCutter-Swift,然后查看Demo

2.直接将目录下的SKArchCutter-Swift拷贝到工程中,或在podfile文件夹中添加 pod 'SKArchCutter-Swift'

3.如果觉得还不错,点个star吧~

使用方法

进行圆角切割

UIView/UIButton/UILabel

SKArchCutter_Swift.cuttingView(view: myView, direction: [UIRectCorner.topRight, UIRectCorner.topLeft], cornerRadii: myView.frame.size.height / 2, borderWidth: 1, borderColor: UIColor.black, backgroundColor: UIColor.red)

UIImageView

SKArchCutter_Swift.cuttingImageView(imageView: myImageView, direction: UIRectCorner.allCorners, cornerRadii: myImageView.frame.size.height / 2, borderWidth: 1, borderColor: UIColor.purple, backgroundColor: UIColor.clear)

感谢你花时间阅读以上内容, 如果这个项目能够帮助到你,记得告诉我

Email: [email protected]

Latest podspec

{
    "name": "SKArchCutter-Swift",
    "version": "0.0.2",
    "summary": "A arch cutter of Swift",
    "description": "SKArchCutter-Swiftu662fu4e00u4e2au57fau4e8e Swift u7684u53efu81eau9009u5207u5272u89d2u7684u5706u89d2u5207u5272u5de5u5177uff0cu540cu65f6u652fu6301UIViewu3001UIImageViewu3001UIButtonu548cUILabelu7684u5355u89d2u5207u5706/u9009u89d2u62f1u5f62u5207u5706/u5168u89d2u5207u5706uff0cu5e76u4e14u907fu514du4e86UIImageViewu4f7fu7528u7cfbu7edfu5706u89d2u6240u5bfcu81f4u7684u79bbu5c4fu6e32u67d3u7684u95eeu9898uff0cu4ee5u53cau786eu4fddlayeru5bf9u8c61u7684masksToBoundsu5c5eu6027u59cbu7ec8u4e3aNOuff0cu4eceu800cu4f7fu5f97u9879u76eeu4e2du5927u91cfu4f7fu7528u5706u89d2u65f6u7684u6027u80fdu5f97u5230u5f88u5927u7a0bu5ea6u7684u4f18u5316, u6700u91cdu8981u7684u662fu4f7fu7528u7b80u5355u3001u65b9u4fbfu3002",
    "homepage": "https://github.com/shevakuilin/SKArchCutter-Swift",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ShevaKuilin": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/shevakuilin/SKArchCutter-Swift.git",
        "tag": "0.0.2"
    },
    "source_files": "Source/**/*.swift"
}

Pin It on Pinterest

Share This