UIView
public extension UIView
-
Undocumented
Declaration
Swift
var parentViewController: UIViewController? { get } -
Undocumented
Declaration
Swift
class func getView(for name: String) -> UIView? -
loading view from a nil
Declaration
Swift
func loadFromNib(with nibName: String? = nil)Parameters
nibNamenib file in project
-
static func to get name of the class as string.
Declaration
Swift
static var nameOfClass: String { get } -
Computated property to get class name
Declaration
Swift
var nameOfClass: String { get } -
Anchor view to it’s super view
Declaration
Swift
func anchorToSuperview(edgeInset: UIEdgeInsets = .zero)Parameters
edgeInsetsetting inset edges for view in superview. default value is
.zero. -
Anchor view to super view’s safe area
Declaration
Swift
@available(iOS 11, *) func anchorToSuperviewSafeArea() -
Anchor view to another view with edgeInsets
Declaration
Swift
func anchor(to view: UIView, edgeInset: UIEdgeInsets = .zero)Parameters
viewdestination view
edgeInsetedgeInset, default is
.zero -
Anchor current view centered to destination view.
Declaration
Swift
func anchor(centerTo view: UIView, offset: CGPoint = .zero)Parameters
viewDestination/other View
offsetOffset from cetner. Default is
.zero
UIView Extension Reference