My first instinct when someone says "not reproducible for me with a scroll 
view" on Mac is: Maybe it only occurs with overlay scrollers, or only with 
separate scrollers? Have you tried toggling that setting?

Also, are you calling setNeedsDisplay: or setNeedsDisplayInRect: anywhere? 
That's usually how you cause redraws.

If this is only while scrolling, are you perhaps doing things in drawRect: that 
you shouldn't? drawRect: should only draw when the OS calls it. Calling 
drawRect: directly is not supported. Changing state inside drawRect: or calling 
setNeedsDisplay: or moving or resizing views or windows is not supported in 
drawRect:. These things often work by accident though, so I've seem lots of 
code naïvely doing it.

Similarly, NSView etc. only work when used from the main thread, if you are 
calling methods on views from a secondary thread (like a Dispatch Queue, or a 
callback that isn't guaranteed to be on the main thread), it might work by 
accident, but it is unsupported and unsafe.

Finally, are you maybe forgetting to apply layout constraints to any of your 
views, or forgot to set its translatesAutoresizingMaskIntoConstraints properly 
somewhere? That could cause a view to have the wrong size and clip.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de

> On 14. Dec 2019, at 15:16, Redler Eyal via Cocoa-dev 
> <cocoa-dev@lists.apple.com> wrote:
> 
> Hi All,
> 
> I'm getting reports from users complaining about a strange display issue on 
> Catalina with my app.
> My app is a word-processor (not based on the cocoa text system) whose main 
> display shows the pages of the document. Every page is a separate view and 
> all the pages are subviews of one big view which resides inside a scroll view.
> 
> The problem is that when with some documents, sometimes, when the user 
> scrolls down the document, some pages are not drawn or even partially drawn. 
> When the user clicks the place where the page is supposed to appear, it shows 
> up.
> Another interesting bit is seems that while the scroll view background is 
> drawn, the document views (the view containing the page views) drawRect is 
> not called or at least not taking effect, I can tell because the pages on 
> this view cast a shadow which is drawn by drawing blank squares on the 
> document view with a transparency layer.
> Last bit of info, copiesOnScroll set to NO for this view and I see that this 
> property is deprecated on Catalina.
> 
> So far I'm struggling with this for a couple of weeks, I wasn't able to 
> reproduce this at all on my machine.
> I'm really desperate for an answer and while I'm not expecting anyone here to 
> provide me with one (wouldn't object, of course :-)) I would love if people 
> reading this might try to speculate to the causes of this or perhaps if you 
> have any direction as to what to test on my users machines in order to be 
> able to reproduce this.
> 
> Thanks
> 
> Eyal Redler
> ------------------------------------------------------------------------------------------------
> "If Uri Geller bends spoons with divine powers, then he's doing it the hard 
> way."
> --James Randi
> www.eyalredler.com
> 
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/witness.of.teachtext%40gmx.net
> 
> This email sent to witness.of.teacht...@gmx.net

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to