简体   繁体   English

如何在Xcode中更改PDFView批注背景色?

[英]How to change PDFView annotation background color in Xcode?

I have use PDFView to add annotations to PDF pages. 我已经使用PDFView将注释添加到PDF页面。 However the annotations' background color is transparent red by default. 但是,注释的背景颜色默认为透明的红色。 Is it possible to change the annotation background color? 可以更改注释背景颜色吗?

And also I found the resize spot is very small, can I change the resize spot size too? 而且我发现调整尺寸斑点很小,我也可以更改调整尺寸斑点大小吗?

Thanks a lot. 非常感谢。 I have attached a screenshot. 我已经附上了截图。

红色背景

Got the answer. 得到了答案。 Change the code in DrawPage: 更改DrawPage中的代码:

path = [NSBezierPath bezierPathWithRect: bounds];
    [path setLineJoinStyle: NSRoundLineJoinStyle];

    [[NSColor colorWithDeviceRed: 0.0 green: 0.0 blue: 0.0 alpha: 0.1] set]; 
//change Here

     [path fill];
    [[NSColor blackColor] set];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM