|
|
# UIView
|
|
|
|
|
|
## Interface Builder
|
|
|
|
|
|
```swift
|
|
|
@IBDesignable public class IBView: UIView {}
|
|
|
|
|
|
@IBInspectable UIView.cornerRadius: CGFloat
|
|
|
@IBInspectable UIView.borderWidth: CGFloat
|
|
|
@IBInspectable UIView.borderColor: UIColor?
|
|
|
```
|
|
|
|
|
|
## Constraints
|
|
|
|
|
|
```swift
|
|
|
UIView.addVisualConstraints(H: String? = nil, V: String? = nil, removeAutoresizing: Bool = true, view: UIView) -> [NSLayoutConstraint]
|
|
|
|
|
|
UIView.addFillConstraints(view: UIView, margin: Int = 0, removeAutoresizing: Bool = true)
|
|
|
|
|
|
UIView.addCenterConstraintsForView(view: UIView, removeAutoresizing: Bool = true)
|
|
|
|
|
|
UIView.addEqualConstraint(view: UIView, relation: NSLayoutRelation = .equal, attribute: NSLayoutAttribute, multiplier: CGFloat = 1, constant: CGFloat = 0) -> NSLayoutConstraint
|
|
|
```
|
|
|
|
|
|
## Snapshot
|
|
|
|
|
|
```swift
|
|
|
UIView.snapshotImage(afterScreenUpdates: Bool = false, snapshotLayer: Bool = false) -> UIImage?
|
|
|
``` |