How to change PDFView annotation background color in Xcode?

437 views Asked by At

I have use PDFView to add annotations to PDF pages. 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.

Red background

1

There are 1 answers

0
SuperBerry On BEST ANSWER

Got the answer. Change the code in 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];