Load Xib2 in mode
Nsarray *array = [[NSBundle mainbundle] loadnibnamed:@ "xib name" Owner:nil Options:nil];
uinib *nib = [uinib nibwithnibname:@ "xib name" Bundle:nil]; Nil default is Mainbundle
Nsarray *array = [nib Instantitewithower:nil object:nil];
Attention points for the use of Xib
If you are creating a control through code, you must call initWithFrame when initializing
If a control is created through Xib or storyboard, initWithFrame is not called when initialized, and Initwithcoder is called
If the control is created through Xib or storyboard, the Awakefromnib method is called when the initialization is complete.
It is recommended to initialize in awakefromnib.
Layoutsubviews the frame that sets the child control can also be initialized
Set the child control's frame in the Layoutsubviews method (Layoutsubviews Be sure to call [Super Layoutsubviews])
Xcode xib loading, attention points