1. In the case of view is not very complicated, if after multiple checks still appear coding-compliant this situation, simply completely remove this xib re-create a xib to do it again. (The truth is not yet clear)
2. Approximate steps to initialize the view in Xib:
//call this method in Superview to initialize the view+ (xttopfloatingview*) instancexttopfloatingview{Nsarray*nibview = [[NSBundle mainbundle]loadnibnamed:@"Xttopfloatingview"Owner:nil Options:nil]; return[Nibview lastobject];}//methods that must be called when initializing- (ID) Initwithcoder: (Nscoder *) adecoder{ Self=[Super Initwithcoder:adecoder]; if(self) {}returnSelf ;}//You can adjust the view here, this method is optional- (void) awakefromnib{}
// The call to view in Superview is roughly as follows -(void) viewwillappear: (BOOL) animated{// Create floating View xttopfloatingview *floatingview = [Xttopfloatingview Instancexttopfloatingview]; = CGRectMake (0, WIDTH (Self.view),); [Self.view Addsubview:floatingview]; [Self.view Bringsubviewtofront:floatingview];}
3. If view needs to respond to an event and the view does not respond to an event after adding the view to Superview, you can try to add the associated code of the view's Addsubview action to the viewwillappear of Superview.
Special thanks: http://www.07net01.com/program/2016/02/1227909.html
IOS Custom View Control with Xib Debug notes