vomi
vomi

Reputation: 1163

How to draw text on PDFKit's PDFView's background

I Want to write a text message, typically "Drag & Drop a PDF here" on PDFView's "background" view. By background view I mean the matte gray view displayed when no PDF document is set.

Based on documentation, I was only able to change the background color (default is gray) using

(void)setBackgroundColor:(NSColor *)newColor

Any idea how to implement this?

Thanks in advance.

Upvotes: 1

Views: 1034

Answers (1)

vomi
vomi

Reputation: 1163

Based on Willeke answer, I was able to put a label on top on my PDF view using the Z indexes.

In interface builder, the lower the item in the list, the higher the z index. Thus in my example, I dragged and dropped the label under the PDFView. Note: you need to launch the application to see the result, the preview will not show the label.

Upvotes: 1

Related Questions