Skip to content

Commit 8f2cf5e

Browse files
committed
fix(ios): ensure background is transparent by default
1 parent 100f064 commit 8f2cf5e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/canvas.ios.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable no-redeclare */
22
import { Font, FontStyle, FontWeight } from '@nativescript/core/ui/styling/font';
3-
import { CSSType, Color, View } from '@nativescript/core';
3+
import { CSSType, Color, View, backgroundColorProperty } from '@nativescript/core';
44
import { layout } from '@nativescript/core/utils/utils';
55
import { ImageSource } from '@nativescript/core/image-source';
66
import { Canvas as ICanvas, FontMetrics as IFontMetrics, Matrix as IMatrix, Paint as IPaint, Path as IPath, PorterDuffXfermode as IPorterDuffXfermode, Rect as IRect, RectF as IRectF } from './canvas';
@@ -2094,6 +2094,7 @@ export class CanvasView extends CanvasBase {
20942094
createNativeView() {
20952095
const view = UICustomCanvasView.initWithOwner(new WeakRef(this));
20962096
view.backgroundColor = UIColor.clearColor;
2097+
this.style['css:background-color'] = 'transparent';
20972098
return view;
20982099
}
20992100
_onSizeChanged() {

0 commit comments

Comments
 (0)