Note that there are some explanatory texts on larger screens.

plurals
  1. POPDFView in Mavericks does not "Automatically scale" and always shows scrollbar
    primarykey
    data
    text
    <p>I am creating a OSX PDF viewer application. At the bottom there is a horizontal scroll bar so the user can easily scroll between pages. When scrolling there is a small preview window showing a preview of that page. This works fine under OSX 10.7 and 10.8 but in Mavericks 10.9 the "Automatically scale" option does seem to loose its effect. There is also a scrollbar (even if setting the scale to a value that does not require a scrollbar).</p> <p>Any ideas on how to solve this?</p> <p>OSX 10.7 and 10.8:</p> <p><img src="https://i.stack.imgur.com/A5sqM.png" alt="OSX 10.7 and 10.8"></p> <p>OSX Mavericks: </p> <p><img src="https://i.stack.imgur.com/RMnHo.png" alt="OSX Mavericks"></p> <p>Code for setting up the view:</p> <pre><code>- (void)awakeFromNib { [super awakeFromNib]; [_pdfView setAutoScales:YES]; [_pdfView setDisplayMode:kPDFDisplayTwoUp]; [_pdfView setDisplaysPageBreaks:NO]; [self setWantsLayer:YES]; } - (void)drawRect:(NSRect)dirtyRect { [super drawRect:dirtyRect]; CGContextRef context = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort]; CGContextSetRGBFillColor(context, 0.227,0.251,0.337,0.8); CGContextFillRect(context, NSRectToCGRect(dirtyRect)); } </code></pre> <p>The view structure from <code>po [self.previewView _subtreeDescription]</code>:</p> <pre><code>$0 = 0x0000000113dcd280 [ A WLU#] h=&amp;-&amp; v=--&amp; IBPreviewView 0x119554760 f=(730.097,47,300,200) b=(-) =&gt; &lt;_NSViewBackingLayer: 0x110a5b800&gt; TIME drawRect: min/mean/max 0.00/0.00/0.00 ms [ O WlU ] h=-&amp;- v=-&amp;- PDFView 0x104cb9c20 f=(10,60,280,130) b=(-) =&gt; &lt;_NSViewBackingLayer: 0x114e311a0&gt; TIME drawRect: min/mean/max 0.00/0.00/0.00 ms [ AF O wlU ] h=--- v=--- PDFViewScrollView 0x110a36c60 f=(0,0,280,130) b=(-) =&gt; &lt;_NSViewBackingLayer: 0x110a374a0&gt; TIME drawRect: min/mean/max 0.00/0.00/0.00 ms [ AF O wlU ] h=--- v=--- PDFCenteringClipView 0x110a2ba30 f=(0,0,265,130) b=(0.5,0,-,-) =&gt; &lt;_NSClipViewBackingLayer: 0x110a42b70&gt; TIME drawRect: min/mean/max 0.00/0.00/0.00 ms [ AF O WLU ] h=--- v=--- PDFMatteView 0x110a28730 f=(0,0,980,683) b=(-) =&gt; &lt;_NSViewBackingLayer: 0x110a3b600&gt; TIME drawRect: min/mean/max 0.00/0.00/0.00 ms [ A LU ] h=--- v=--- PDFDisplayView 0x114e309b0 f=(0,0,980,683) b=(-) TIME drawRect: min/mean/max 0.00/0.00/0.00 ms [ AF wlU ] h=--- v=--- NSScroller 0x100766e50 f=(265,0,15,130) b=(-) =&gt; &lt;_NSViewBackingLayer: 0x100766e20&gt; TIME drawRect: min/mean/max 0.00/0.00/0.00 ms [ AF wlU ] h=-&amp;- v=-&amp;- NSTextField 0x104c87110 f=(7,27,286,25) b=(-) =&gt; &lt;_NSViewBackingLayer: 0x110a5b910&gt; TIME drawRect: min/mean/max 0.00/0.00/0.00 ms [ AF wlU ] h=-&amp;- v=-&amp;- NSTextField 0x110a2ef60 "76 av 152" f=(89,0,115,25) b=(-) =&gt; &lt;_NSViewBackingLayer: 0x110a5b970&gt; TIME drawRect: min/mean/max 0.00/0.00/0.00 ms A=autoresizesSubviews, C=canDrawConcurrently, D=needsDisplay, F=flipped, G=gstate, H=hidden (h=by ancestor), L=needsLayout (l=child needsLayout), U=needsUpdateConstraints (u=child needsUpdateConstraints), O=opaque, P=preservesContentDuringLiveResize, S=scaled/rotated, W=wantsLayer (w=ancestor wantsLayer), #=has surface </code></pre> <p>I have also tested with <code>setNeedsLayout:YES</code> and <code>setNeedsDisplay:YES</code> on both _pdfView and self without any change.</p> <p>Any suggestions?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload