UIView
public extension UIView
-
添加点击手势
Declaration
Swift
func addTapGesture(handler: @escaping NormalClosure)
Parameters
handler
点击回调
-
Declaration
Swift
@objc func tapGesture(_ gesture: UITapGestureRecognizer)
-
EZSE: getter and setter for the x coordinate of the frame’s origin for the view.
Declaration
Swift
var x: CGFloat { get set }
-
EZSE: getter and setter for the y coordinate of the frame’s origin for the view.
Declaration
Swift
var y: CGFloat { get set }
-
EZSE: variable to get the width of the view.
Declaration
Swift
var width: CGFloat { get set }
-
EZSE: variable to get the height of the view.
Declaration
Swift
var height: CGFloat { get set }
-
EZSE: getter and setter for the x coordinate of leftmost edge of the view.
Declaration
Swift
var left: CGFloat { get set }
-
EZSE: getter and setter for the x coordinate of the rightmost edge of the view.
Declaration
Swift
var right: CGFloat { get set }
-
EZSE: getter and setter for the y coordinate for the topmost edge of the view.
Declaration
Swift
var top: CGFloat { get set }
-
EZSE: getter and setter for the y coordinate of the bottom most edge of the view.
Declaration
Swift
var bottom: CGFloat { get set }
-
EZSE: getter and setter for the X coordinate of the center of a view.
Declaration
Swift
var centerX: CGFloat { get set }
-
EZSE: getter and setter for the Y coordinate for the center of a view.
Declaration
Swift
var centerY: CGFloat { get set }
-
批量添加子控件
Declaration
Swift
func addSubviews(_ views: [UIView])
Parameters
views
[view]
-
固定角度圆角
Declaration
Swift
func roundCorners(_ corners: UIRectCorner, radius: CGFloat)
Parameters
corners
角 [UIRectCorner.topLeft, UIRectCorner.topRight]
-
设置圆角
Declaration
Swift
func setCornerRadius(_ radius: CGFloat)
Parameters
radius
圆角角度
-
边框颜色
Declaration
Swift
@IBInspectable var borderColor: UIColor { get set }
-
边框宽度
Declaration
Swift
@IBInspectable var borderWidth: CGFloat { get set }
-
圆角大小
Declaration
Swift
@IBInspectable var cornerRadius: CGFloat { get set }
-
获取当前view的VC
Declaration
Swift
func currentVC() -> UIViewController?
Return Value
VC