Re: Throttling drawing to vertical refresh

2020-10-18 Thread Alex Zavatone via Cocoa-dev
It shouldn’t be too hard to roll your own simply based on milliseconds of a timer. Even a simple if (myMilliseconds > nextUpdateTime) { [updateObject doThatUpdate]; nextUpdateTime = myMilliseconds + msThrottle; } lets you get a basic throttle. Cheers, Alex Zavatone > On Oct

Re: Throttling drawing to vertical refresh

2020-10-18 Thread Andreas Falkenhahn via Cocoa-dev
Not quite. AppKit throttle view refresh to 60fps but it certainly won't throttle code that changes the gfx more often than that, i.e. something like this for(;;) view.layer.contents = (id) getNextFrame(); will hog the CPU. So I need some external timing mechanism to set layer.contents not

Re: How to reposition subviews without Auto Layout

2020-10-18 Thread Andreas Falkenhahn via Cocoa-dev
I didn't know about that. That's why I was asking the question :) I guess your answer is what I was looking for originally but since simply overriding "layout" does the job as well I'll just leave it like it is. On 17.10.2020 at 23:57 Richard Charles wrote: > So why not just do this. >