Skip to content

Commit 25848fb

Browse files
committed
fix macOS CoreGraphics crash
1 parent 400833e commit 25848fb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Example/macOS/macOSExample/RootViewController/RootTableRowView.m‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ - (void)layout
148148
- (void)drawSelectionInRect:(NSRect)dirtyRect
149149
{
150150
// CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort];
151-
// CGContextSetFillColorWithColor(context, (__bridge CGColorRef)[NSColor secondarySelectedControlColor]);
151+
// CGContextSetFillColorWithColor(context, [NSColor secondarySelectedControlColor].CGColor);
152152
// CGContextFillRect(context, dirtyRect);
153153
//
154154
// [[NSColor colorWithWhite:0.5 alpha:0.5] drawSwatchInRect:dirtyRect];
@@ -172,7 +172,7 @@ - (void)drawBackgroundInRect:(NSRect)dirtyRect
172172
case KSeparactorStyleHeadPadding:
173173
{
174174
CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort];
175-
CGContextSetStrokeColorWithColor(context, (__bridge CGColorRef)[NSColor colorWithWhite:0.1 alpha:0.1]);
175+
CGContextSetStrokeColorWithColor(context, [NSColor colorWithWhite:0.1 alpha:0.1].CGColor);
176176
CGContextSetLineWidth(context, 1);
177177
// CGFloat dashArray[] = {3,1};
178178
// CGContextSetLineDash(context, 1, dashArray, 1);//跳过3个再画虚线,所以刚开始有6-(3-2)=5个虚点

0 commit comments

Comments
 (0)