Matt Gemmell

My new book CHANGER is out now!

An action-adventure novel — book 1 in the KESTREL series.

★★★★★ — Amazon

MGViewAnimation minor update

Development & Source 1 min read

Just a minor update this time, to resolve an issue which affects both NSViewAnimation and (prior to this update, of course) MGViewAnimation too. Views placed right next to each (with no space between) would sometimes develop a 1-pixel gap during the course of an animation which moved them both in the same direction. As you might have already guessed, that was due to attempting to place those views on sub-pixel boundaries based on the progress value of the animation. We now apply a mighty round() to the origin point of each new frame for a view during the animation, so their relative positions should remain consistent.

Cheers to Brian Amerige for pointing out the issue, and cheers to me for rounding the hell out of it. Code is available, as always, on the Cocoa Source Code page.