| Flutter iOS Embedder |

Instance Methods | List of all members
UIViewController(FlutterScreenAndSceneIfLoaded) Category Reference

`#import <UIViewController+FlutterScreenAndSceneIfLoaded.h>`

## Instance Methods
(ios(13.0) | - API_AVAILABLE
| Returns a UIWindowScene if the UIViewController's view is loaded, and nil otherwise. More...
(UIScreen *) | - flutterScreenIfViewLoaded

## Detailed Description

Definition at line 10 of file UIViewController+FlutterScreenAndSceneIfLoaded.h.

## Method Documentation

## ◆ API_AVAILABLE

- (ios(13.0) API_AVAILABLE |  |  |

Returns a UIWindowScene if the UIViewController's view is loaded, and nil otherwise.

## ◆ flutterScreenIfViewLoaded

- (UIScreen *) flutterScreenIfViewLoaded |  |  |

Before iOS 13, returns the main screen; After iOS 13, returns the screen the UIViewController is attached to if its view is loaded, and nil otherwise.

Definition at line 10 of file UIViewController+FlutterScreenAndSceneIfLoaded.mm.

22 {
23 if (self.viewIfLoaded == nil) {
24 [FlutterLogger logWarning:@"Trying to access the screen before the view is loaded."];
25 return nil;
26 }
27 return [self flutterWindowSceneIfViewLoaded].screen;
28 }

The documentation for this category was generated from the following files:

- shell/platform/darwin/ios/framework/Source/UIViewController+FlutterScreenAndSceneIfLoaded.h
- shell/platform/darwin/ios/framework/Source/UIViewController+FlutterScreenAndSceneIfLoaded.mm