How to get UIModalPresentationPageSheet frame after traitCollectionDidChange

87 views Asked by At

Some strange behavior occurs when I use multi tasking and try to get frame of the UIViewController.

I use:

- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection 

To update frame of the views after we change application trait collection.

How I mesure width:

CGRectGetWidth(self.view.frame)

Problem is that in very beginning width of the UIViewController in landscape mode is 1024px. After changing of the trait collection, size of the UIViewController is predictable is changing. But when I return to initial state width should be 1024px but it is 694px.

0

There are 0 answers