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:
47
47
if (self) {
48
48
_delegate = delegate;
49
49
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 ;
50
56
}
51
57
52
58
return self;
Original file line number Diff line number Diff line change @@ -49,4 +49,10 @@ - (void)testFlutterViewEnableSemanticsWhenIsAccessibilityElementIsCalled {
49
49
XCTAssertTrue (delegate.callbackCalled );
50
50
}
51
51
52
+ - (void )testFlutterViewBackgroundColorIsNotNil {
53
+ FakeDelegate* delegate = [[FakeDelegate alloc ] init ];
54
+ FlutterView* view = [[FlutterView alloc ] initWithDelegate: delegate opaque: NO ];
55
+ XCTAssertNotNil (view.backgroundColor );
56
+ }
57
+
52
58
@end
You can’t perform that action at this time.
0 commit comments