Custom control from xib - Xcode 6 IBDesignable IBInspectable

This video demonstrates how to create a custom control loaded from xib file that draws itself in interface builder when it is added to any other view. This is done with new Xcode 6 features: IBDesignable and IBInspectable. Note that if you are using autolayout then you will need to add some constraints instead of setting the frame: UIView *view = [[[NSBundle bundleForClass:[self class]] loadNibNamed:@“Test“ owner:self options:nil] firstObject]; [self addSubview:view]; [self addConstraints:[NSLayoutConstra
Back to Top