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
nibName
nib 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
edgeInset
setting 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
view
destination view
edgeInset
edgeInset, default is
.zero
-
Anchor current view centered to destination view.
Declaration
Swift
func anchor(centerTo view: UIView, offset: CGPoint = .zero)
Parameters
view
Destination/other View
offset
Offset from cetner. Default is
.zero