Re: IKImageBrowserView bug?
Re: IKImageBrowserView bug?
- Subject: Re: IKImageBrowserView bug?
- From: Graham Cox <email@hidden>
- Date: Thu, 24 Mar 2016 13:38:19 +1100
> On 23 Mar 2016, at 1:23 PM, Graham Cox <email@hidden> wrote:
>
> Hi all,
>
> I just upgraded to 10.11.4 and XCode 7.3 and therefore the latest SDK. Rebuilding my app, my one instance of IKImageBrowserVIew in my app has gone haywire. Whenever I load new images into it, it scrolls constantly to the bottom of the view. If I manually scroll it elsewhere, it scrolls back to the bottom when I let go. This has worked fine for years, and while I am looking at some new code in this class (and hence have triggered a new compilation of the sources), the new code has no bearing on this issue.
>
> Has anyone else seen this, and if so, what’s the cause/fix? As it stands, the class is unusable.
>
> —Graham
So, can anyone suggest a reasonably easy way to investigate this?
I can subclass IKImageBrowserView, but I’m not sure what method I could override to get a hook into each scroll of the view (other than drawing, which is called too often and in too many other situations to be usable - also I believe IKImageBrowserVIew is largely implemented using layers, so it may not help).
I could also subclass NSScrollView - this is probably my next approach - but I’m hoping there’s an easier way. I need to see what is invoking the scroll of the document (image browser) view.
I have been through my code and checked every place that could conceivably affect scrolling (such as calls to -scrollToIndex:) and none of these are the problem. I’ve tried disabling responsive scrolling, that’s not it. I had one exception due to another issue that suggested that this might be being caused by repeated calls to -setFrameSize:, but I’ve tried overriding that and it only gets called a couple of times - certainly not during this weird scrolling. I’ve also determined that the fault stops after some time - in other words If I leave the view for enough time, I can manually scroll it where I want without it keep jumping back to the bottom. This suggests that there is a time-dependent element that is causing this, possibly the background thread that is loading all of the image thumbnails. When that’s complete, the scrolling stops. But I’ve checked all the places that my code might have a bearing on that, and I’ve drawn a blank - my use of IKImageBrowserView is in any case fairly simple, in that I pass it the URL of the image and it loads that in the background by itself without the intervention of my code.
—Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden