qulj / SwiftSuperellipse

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SwiftSuperellipse

top

Features

  • Superellipse view can be added
  • Any UIView subclass can be masked to Superellipse

Usage

Sample Code

import SwiftSuperellipse

let superellipseView = SuperellipseView(frame: CGRect(x: 20, y: 20, width: 100, height: 100))
superellipseView.backgroundColor = .clear
view.addSubview(superellipseView)

let imageView = UIImageView(image: UIImage(named: "mayuge_dog_face"))
imageView.frame = superellipseView.bounds
superellipseView.addSubview(imageView)

Execution result

sample

Installation

License

MIT License

About

License:MIT License


Languages

Language:Swift 100.0%