InstantiatableContentView
public protocol InstantiatableContentView
Helps to instantiate content view from storyboard file.
-
Undocumented
Declaration
Swift
func instantiateContentView() -> UIView
-
instantiateContentView()
Default implementationDefault Implementation
Instantiates contentView from xib file and makes instantiator it’s owner. Xib filename should be composed of className + “ContentView” postfix. E.g. MyView -> MyViewContentView
Declaration
Swift
func instantiateContentView() -> UIView
-
instantiateAndAttachContentView()
Extension methodInstantiates contentView from xib file and makes instantiator it’s owner. Xib filename should be composed of className + “ContentView” postfix. E.g. MyView -> MyViewContentView After creation puts content view as subview to self and constraints sides. Also makes self background color transparent. The main idea here is that content view should fully set how self view looks.
Declaration
Swift
@available(iOS 9.0, *) func instantiateAndAttachContentView()