Forced Automation Mask to apply to UIView

I have a notification that I add to the application window after launch, so it hovers over all the other views.

When the user rotates the device, the view does not perform automation, like those that belong UIViewController.

Is there a way to manually request a view autoresizingMaskfor application? Or, alternatively, how can I view a view without controlling the size of the image while rotating the device?

+3
source share
3 answers

I found that the views added to the application window do not even rotate, not to mention resizing.

UIView, UIWindow: .

UIWindow* window = [UIApplication sharedApplication].keyWindow;
if (!window) 
    window = [[UIApplication sharedApplication].windows objectAtIndex:0];
[[[window subviews] objectAtIndex:0] addSubview:myView];

, .

+1

autoResizingMask . , .

, , , , . ( ) .

0

:

view.autoresizesSubviews = YES;

?

0

Source: https://habr.com/ru/post/1761799/


All Articles