Note that there are some explanatory texts on larger screens.

plurals
  1. USPierre Houston
    primarykey
    data
    text
    plurals
    1. COIt sound right that this is a priority issue. However, in the case that prompted this posting, the window was larger than what the added subview needed. The subview wouldn't have been compressed, but instead expanded (the problem was that it didn't expand but instead the window shrunk). Does this mean the compression resistance priority wouldn't come into play? Must the Content Hugging priority instead also be set to <500, or am I confused? (I've been working with auto-layout for almost a year and I still find it difficult to visualize the purpose of those 2 sets of priorities).
      singulars
    2. COAnswering my own question in the above comment: I had to make my view set needsDisplay to YES whenever its frame changed, and I overrode setFrame itself to do it. I'm not sure if this is the normal way to do this, or if there's some built-in mechanism similar to CALayer's needsDisplayOnBoundsChange, but its working.
      singulars
    3. COYou're both finding scaling the documentView's superview to scale perfectly? I'm seeing clipping on the right & incorrect reflow. Are you scaling just once, or repeatedly, as in zoom in & out buttons under user control? scaleUnitSquareToSize doesn't work as one might expect in this circumstance, I finally found this Apple Q&A which shed some light https://developer.apple.com/library/mac/#qa/qa2004/qa1346.html but something still isn't right. Using the category there, I'm using essentially: clipView=[documentView superview]; clipView.scale=NSMakeSize(scale,scale); clipView.needsDisplay=YES;
      singulars
 

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