Latest 0.1.0
Homepage https://github.com/superk589/ZKCornerRadiusView
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

Swift4
Version
License
Platform

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

Installation

CocoaPods:

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate ZKPageViewController into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/superk589/ZKCornerRadiusView.git'
platform :ios, '8.0'
use_frameworks!

target 'YourApp' do
    pod 'ZKCornerRadiusView'
end

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate ZKPageViewController into your Xcode project using Carthage, specify it in your Cartfile:

github "superk589/ZKCornerRadiusView"

Run carthage update to build the framework and drag the built ZKCornerRadiusView.framework into your Xcode project.

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)

Latest podspec

{
    "name": "ZKCornerRadiusView",
    "version": "0.1.0",
    "summary": "A subclass of UIImageView to avoid offscreen-rendering.",
    "description": "This is a subclass of UIImageView. It supports to set corner radius with no offscreen-rendering.",
    "homepage": "https://github.com/superk589/ZKCornerRadiusView",
    "license": "MIT",
    "authors": {
        "zhenkai zhao": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/superk589/ZKCornerRadiusView.git",
        "tag": "0.1.0"
    },
    "source_files": "Sources/*.swift",
    "frameworks": "UIKit",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This