This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
shell/platform/darwin/ios/framework/Source Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,12 @@ - (instancetype)initWithDelegate:(id<FlutterViewEngineDelegate>)delegate opaque:
4747 if (self) {
4848 _delegate = delegate;
4949 self.layer .opaque = opaque;
50+
51+ // This line is necessary. CoreAnimation(or UIKit) may take this to do
52+ // something to compute the final frame presented on screen, if we don't set this,
53+ // it will make it take long time for us to take next CAMetalDrawable and will
54+ // cause constant junk during rendering.
55+ self.backgroundColor = UIColor.clearColor ;
5056 }
5157
5258 return self;
Original file line number Diff line number Diff line change @@ -49,4 +49,10 @@ - (void)testFlutterViewEnableSemanticsWhenIsAccessibilityElementIsCalled {
4949 XCTAssertTrue (delegate.callbackCalled );
5050}
5151
52+ - (void )testFlutterViewBackgroundColorIsNotNil {
53+ FakeDelegate* delegate = [[FakeDelegate alloc ] init ];
54+ FlutterView* view = [[FlutterView alloc ] initWithDelegate: delegate opaque: NO ];
55+ XCTAssertNotNil (view.backgroundColor );
56+ }
57+
5258@end
You can’t perform that action at this time.
0 commit comments