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
radius
radius
-
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
width
border thickness
color
border color
- Parameters:
-
add only top border
- Parameters:
- size: border thickness
- color: border color
Declaration
Swift
public func addBorderTop(size: CGFloat, color: UIColor)
Parameters
size
border thickness
color
border 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
size
border thickness
color
border color
padding
padding to size
- Parameters:
-
add only bottom border
- Parameters:
- size: border thickness
- color: border color
Declaration
Swift
public func addBorderBottom(size: CGFloat, color: UIColor)
Parameters
size
border thickness
color
border color
- Parameters:
-
add only left border
- Parameters:
- size: border thickness
- color: border color
Declaration
Swift
public func addBorderLeft(size: CGFloat, color: UIColor)
Parameters
size
border thickness
color
border color
- Parameters:
-
add only right border
- Parameters:
- size: border thickness
- color: border color
Declaration
Swift
public func addBorderRight(size: CGFloat, color: UIColor)
Parameters
size
border thickness
color
border color
- Parameters:
-
remove constraint
Parameter
Parameter constraint: existing constraintDeclaration
Swift
public func autoRemoveConstraint(_ constraint : NSLayoutConstraint?)
Parameters
constraint
existing 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
fillColor
fill color
strokeColor
stroke color
strokeWidth
stroke width
- Parameters:
-
Draw stroke
- Parameters:
- width: stroke width
- color: stroke color
Declaration
Swift
public func drawStroke(width: CGFloat, color: UIColor)
Parameters
width
stroke width
color
stroke color
- Parameters: