I have a view loaded quite simply:
self.splashView = [[[NSBundle mainBundle] loadNibNamed:@"DownloadingData"
owner:nil options:nil] objectAtIndex:0];
[self.view addSubview:self.splashView];
It's a full height 4" retina view in portrait mode with status bar, top bar and bottom bar set to none. It has constraints such that an image is aligned along the bottom. I use similar views within controllers elsewhere in the app and they resize into the available space (with NavigationBar and TabBar) absolutely fine. However this view, loaded directly from a nib and then added appears to ignore the constraints.
The view is intended for use in all sorts of situations, e.g. with/without any combination of navigation bars/tab bars.
I've tried various combinations of setNeedsLayout
, setNeedsUpdateConstraints
on splashView. I have also tried calling layoutSubviews
on the view itself.
Can anyone offer some advice? In this instance should I be doing it another way? With a viewController perhaps, or adding the constraints manually in code?