UIView
Undocumented
- 
                  
                  
quick access to x
Declaration
Swift
public var x: CGFloat - 
                  
                  
quick access to y
Declaration
Swift
public var y: CGFloat - 
                  
                  
shorthand for view width
Declaration
Swift
public var w: CGFloat - 
                  
                  
shorthand for view height
Declaration
Swift
public var h: CGFloat - 
                  
                  
Set corner radius
Parameter
Parameter radius: radiusDeclaration
Swift
public func setCornerRadius(radius: CGFloat)Parameters
radiusradius
 - 
                  
                  
add shadow for view
Declaration
Swift
public func addShadow(offset: CGSize, radius: CGFloat, color: UIColor, opacity: Float, cornerRadius: CGFloat? = nil) - 
                  
                  
Add border
- Parameters:
- width: border thickness
 - color: border color
 
 
Declaration
Swift
public func addBorder(width: CGFloat, color: UIColor)Parameters
widthborder thickness
colorborder color
 - Parameters:
 - 
                  
                  
add only top border
- Parameters:
- size: border thickness
 - color: border color
 
 
Declaration
Swift
public func addBorderTop(size: CGFloat, color: UIColor)Parameters
sizeborder thickness
colorborder color
 - Parameters:
 - 
                  
                  
add only top border with padding
- Parameters:
- size: border thickness
 - color: border color
 - padding: padding to size
 
 
Declaration
Swift
public func addBorderTopWithPadding(size: CGFloat, color: UIColor, padding: CGFloat)Parameters
sizeborder thickness
colorborder color
paddingpadding to size
 - Parameters:
 - 
                  
                  
add only bottom border
- Parameters:
- size: border thickness
 - color: border color
 
 
Declaration
Swift
public func addBorderBottom(size: CGFloat, color: UIColor)Parameters
sizeborder thickness
colorborder color
 - Parameters:
 - 
                  
                  
add only left border
- Parameters:
- size: border thickness
 - color: border color
 
 
Declaration
Swift
public func addBorderLeft(size: CGFloat, color: UIColor)Parameters
sizeborder thickness
colorborder color
 - Parameters:
 - 
                  
                  
add only right border
- Parameters:
- size: border thickness
 - color: border color
 
 
Declaration
Swift
public func addBorderRight(size: CGFloat, color: UIColor)Parameters
sizeborder thickness
colorborder color
 - Parameters:
 - 
                  
                  
remove constraint
Parameter
Parameter constraint: existing constraintDeclaration
Swift
public func autoRemoveConstraint(_ constraint : NSLayoutConstraint?)Parameters
constraintexisting constraint
 - 
                  
                  
Draw circle over view
- Parameters:
- fillColor: fill color
 - strokeColor: stroke color
 - strokeWidth: stroke width
 
 
Declaration
Swift
public func drawCircle(fillColor: UIColor, strokeColor: UIColor, strokeWidth: CGFloat)Parameters
fillColorfill color
strokeColorstroke color
strokeWidthstroke width
 - Parameters:
 - 
                  
                  
Draw stroke
- Parameters:
- width: stroke width
 - color: stroke color
 
 
Declaration
Swift
public func drawStroke(width: CGFloat, color: UIColor)Parameters
widthstroke width
colorstroke color
 - Parameters:
 
View on GitHub
        UIView Extension Reference