freshOS / Stevia

:leaves: Concise Autolayout code

Home Page:https://freshos.github.io/SteviaDocs/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for cornerRadius

brzzdev opened this issue · comments

commented

Being able to set cornerRadius(12) along with the rest of my Stevia layout code would really be nice.

It would need to set layer.masksToBounds = false automatically, similar to how Stevia currently sets translatesAutoresizingMaskIntoConstraints = false.

At the moment I have this added in Stevia fashion myself through

extension UIView {
	
	func cornerRadius(_ radius: CGFloat) {
		
		layer.masksToBounds = true
		layer.cornerRadius = radius
	}
}

but it'd be nice to have cornerRadius supported.