UIView
public extension UIView
-
Undocumented
Declaration
Swift
func addTapGestureRecognizer(_ action: (() -> Void)?)
-
Returns UIView UINib
Declaration
Swift
var nib: UINib { get }
-
Get subviews
Declaration
Swift
func subviews<T>(ofType type: T.Type) -> [T] -
Removes all subviews in a view
Declaration
Swift
func removeAllSubviews()
-
View’s Width Getter and Setter
Declaration
Swift
var width: CGFloat { get set } -
View’s Height Getter and Setter
Declaration
Swift
var height: CGFloat { get set } -
View’s Size Getter and Setter
Declaration
Swift
var size: CGSize { get set } -
View’s CenterX Getter and Setter
Declaration
Swift
var centerX: CGFloat { get set } -
View’s CenterY Getter and Setter
Declaration
Swift
var centerY: CGFloat { get set } -
View’s Left(minX) Getter and Setter
Declaration
Swift
var left: CGFloat { get set } -
View’s Top(minY) Getter and Setter
Declaration
Swift
var top: CGFloat { get set } -
View’s Right(maxX) Getter and Setter
Declaration
Swift
var right: CGFloat { get set } -
View’s Bottom(maxY) Getter and Setter
Declaration
Swift
var bottom: CGFloat { get set } -
View’s Position Getter and Setter
Declaration
Swift
var position: CGPoint { get set } -
View’s X Value Getter and Setter
Declaration
Swift
var x: CGFloat { get set } -
View’s Y Value Getter and Setter
Declaration
Swift
var y: CGFloat { get set }
-
Radius for any specifc corner
Declaration
Swift
func roundCorners(corners: UIRectCorner, radius: CGFloat)Parameters
cornersCorner for radius
radiusRadius value
-
Shakes a view up-down
Declaration
Swift
func shake()
-
Adds shadow to view
Declaration
Swift
func addShadow(shadowColor: UIColor, radius: CGFloat, opacity: Float)Parameters
shadowColorShadow Color
radiusShadow Radius
opacityShadow Opacity
-
Adds Sketch Shadow to view
Declaration
Swift
func addSketchShadow(color: UIColor = .black, alpha: Float = 0.2, x: CGFloat = 0, y: CGFloat = 2, blur: CGFloat = 4, spread: CGFloat = 0)
View on GitHub
UIView Extension Reference