| 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 22 of file FlutterOverlayView.h.

## Method Documentation

## ◆ initWithCoder:

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

Definition at line 24 of file FlutterOverlayView.mm.

24 :(NSCoder*)aDecoder {
25 NSAssert(NO, @"FlutterOverlayView must init or initWithContentsScale");
26 return nil;
27 }

## ◆ initWithContentsScale:pixelFormat:

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

Definition at line 41 of file FlutterOverlayView.mm.

41 :(CGFloat)contentsScale
42 pixelFormat:(MTLPixelFormat)pixelFormat {
43 self = [self init];
44
45 if ([self.layer isKindOfClass:NSClassFromString(@"CAMetalLayer")]) {
46 self.layer.allowsGroupOpacity = NO;
47 self.layer.contentsScale = contentsScale;
48 self.layer.rasterizationScale = contentsScale;
49 #pragma clang diagnostic push
50 #pragma clang diagnostic ignored "-Wunguarded-availability-new"
51 CAMetalLayer* layer = (CAMetalLayer*)self.layer;
52 #pragma clang diagnostic pop
53 layer.pixelFormat = pixelFormat;
54 if (pixelFormat == MTLPixelFormatRGBA16Float || pixelFormat == MTLPixelFormatBGRA10_XR) {
55 self->_colorSpaceRef = fml::CFRef(CGColorSpaceCreateWithName(kCGColorSpaceExtendedSRGB));
56 layer.colorspace = self->_colorSpaceRef;
57 }
58 }
59 return self;
60 }

## ◆ initWithFrame:

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

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

Definition at line 19 of file FlutterOverlayView.mm.

19 :(CGRect)frame {
20 NSAssert(NO, @"FlutterOverlayView must init or initWithContentsScale");
21 return nil;
22 }

## ◆ 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