iPhone utilities mostly for Core Animation