I'm seeing times when self.traitCollection is undefined in viewDidLoad:
If I do the following simple presentation - the traits are NOT set (in viewDidLoad:)
TableViewController* vc = [[TableViewController alloc] initWithStyle:UITableViewStylePlain];
vc.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:vc animated:YES completion:nil];
However, if I use UIModalPresentationCurrentContext the traits ARE set (in viewDidLoad:)
Stranger still - if I insert a navigation controller as follows, the traits ARE set (in viewDidLoad: even with FullScreen presentation mode)
TableViewController* vc = [[TableViewController alloc] initWithStyle:UITableViewStylePlain];
UINavigationController* nav = [[UINavigationController alloc] initWithRootViewController:vc];
nav.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:nav animated:YES completion:nil];
Obviously my 'solution' is to use CurrentContext - but I'm not clear whether this is a bug or a gap in my understanding. Any pointers would be most welcome.
I'm using iOS 8.3
Thanks