In fact, you do not need to create a Cocoa Touch framework. If you create a user view with nib that contains user interface elements and show them a different view, just add the code to your user view
-(instancetype)initWithFrame:(CGRect)frame{ #if !TARGET_INTERFACE_BUILDER self= [super initWithFrame:frame]; if(self){ } return self; #else NSBundle *bundle = [NSBundle bundleForClass:[self class]]; return [bundle loadNibNamed:NSStringFromClass([self class]) owner:self options:nil][0]; #endif }
Since you do not have the main package when you are in development mode, you will not be able to get your own view for rendering. In addition to this, if you have additional properties and set them on your ui elements, you can do this in the method
-(void)prepareForInterfaceBuilder{ }
source share