| Flutter iOS Embedder |

Instance Methods | List of all members
FlutterOverlayView Class Reference

`#import <FlutterOverlayView.h>`

Inheritance diagram for FlutterOverlayView:

## Instance Methods
(instancetype) | - initWithFrame:
(instancetype) | - initWithCoder:
(instancetype) | - NS_DESIGNATED_INITIALIZER
(instancetype) | - initWithContentsScale:pixelFormat:

## Detailed Description

UIViews that are used by |FlutterPlatformViews| to present Flutter rendering on top of system compositor rendering (ex. a web view).

When there is a view composited by the system compositor within a Flutter view hierarchy, instead of rendering into a single render target, Flutter renders into multiple render targets (depending on the number of interleaving levels between Flutter & non-Flutter contents). While the FlutterView contains the backing store for the root render target, the FlutterOverlay view contains the backing stores for the rest. The overlay views also handle touch propagation and the like for touches that occurs either on overlays or otherwise may be intercepted by the platform views.

Definition at line 31 of file FlutterOverlayView.h.

## Method Documentation

## ◆ initWithCoder:

- (instancetype) initWithCoder: |  | (NSCoder*) | NS_UNAVAILABLE |

Definition at line 32 of file FlutterOverlayView.mm.

32 :(NSCoder*)aDecoder {
33 NSAssert(NO, @"FlutterOverlayView must init or initWithContentsScale");
34 return nil;
35 }

## ◆ initWithContentsScale:pixelFormat:

- (instancetype) initWithContentsScale: |  | (CGFloat) | contentsScale
pixelFormat: |  | (MTLPixelFormat) | pixelFormat

Definition at line 49 of file FlutterOverlayView.mm.

49 :(CGFloat)contentsScale
50 pixelFormat:(MTLPixelFormat)pixelFormat {
51 self = [self init];
52
53 if ([self.layer isKindOfClass:NSClassFromString(@"CAMetalLayer")]) {
54 self.layer.allowsGroupOpacity = NO;
55 self.layer.contentsScale = contentsScale;
56 self.layer.rasterizationScale = contentsScale;
57 #pragma clang diagnostic push
58 #pragma clang diagnostic ignored "-Wunguarded-availability-new"
59 CAMetalLayer* layer = (CAMetalLayer*)self.layer;
60 #pragma clang diagnostic pop
61 layer.pixelFormat = pixelFormat;
62 if (pixelFormat == MTLPixelFormatRGBA16Float) {
63 self->_colorSpaceRef = fml::CFRef(CGColorSpaceCreateWithName(kCGColorSpaceExtendedSRGB));
64 layer.colorspace = self->_colorSpaceRef;
65 }
66 }
67 return self;
68 }

## ◆ initWithFrame:

- (instancetype) initWithFrame: |  | (CGRect) | NS_UNAVAILABLE |

Initial value:
{
fml::CFRef<CGColorSpaceRef> _colorSpaceRef

Definition at line 27 of file FlutterOverlayView.mm.

27 :(CGRect)frame {
28 NSAssert(NO, @"FlutterOverlayView must init or initWithContentsScale");
29 return nil;
30 }

## ◆ NS_DESIGNATED_INITIALIZER

- (instancetype) NS_DESIGNATED_INITIALIZER |  |  |

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

- shell/platform/darwin/ios/framework/Source/FlutterOverlayView.h
- shell/platform/darwin/ios/framework/Source/FlutterOverlayView.mm