Benches Uncategorized

2

Transform matrix error?

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

I'm getting a strange error when adjusting the matrix of one of my UIViews ( on the iPhone ):

<Error>: CGAffineTransformInvert: singular matrix

Anyone know what that means?

Here is my code:

CGAffineTransform myTransform;
myTransform = CGAffineTransformMakeScale(g_ViewScale, g_ViewScale );
myView.transform = myTransform;

Any help would be great. Thanks!

2 replies

Sign in or join Beachball Help to reply.

  1. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Silly question, but have you checked the value of g_ViewScale?

  2. 0

    Apple Support Community member

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Doh! Silly question = me finding dumb logic using 0.0f for g_ViewScale

    Thanks!