First, to test that anything is happening, add awakeFromNib to your view controller and set preferred content size (all code in Obj C):
- (void)awakeFromNib {
[super awakeFromNib];
[self setPreferredContentSize:CGSizeMake(self.view.bounds.size.width, 50)];
}
As milesper said above, comment out the default init method and create an empty initWithCoder: to get around some bug in Beta 2:
-(id)initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithCoder:aDecoder];
if (self) {
// init
}
return self;
}
//- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
// self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
// if (self) {
// // Custom initialization
// }
// return self;
//}
Now Clean and then run again. At this point you should see it resize (make sure you add a label with text or something to test).
Make sure you test with a plain UIViewController class, not a subclass. Once you see your widget size respond, then try a subclass. I spent an hour today just to find out that using UICollectionViewController simply doesn't work in Beta 2 (will file a RADAR).