ZKCornerRadiusView 0.1.0

ZKCornerRadiusView 0.1.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Sep 2017
SwiftSwift Version 4.0
SPMSupports SPM

Maintained by superk.



  • By
  • zhenkai zhao

A subclass of UIImageView to avoid offscreen-rendering when setting cornerRadius

Installation

Manually

If you prefer not to use either of the aforementioned dependency managers, you can integrate ZKCornerRadiusView into your project manually.

Usage

let view = ZKCornerRadiusView()
view.zk.backgroundColor = UIColor.yellow
view.zk.borderColor = UIColor.blue
view.zk.borderWidth = 4
view.zk.cornerRadius = 6

// if only want a one color image(with border maybe), use this method manually.
// view.render()

// when set image to the view, all the attributes set above will work.
view.image = UIImage.init(named: imageName)