Scaled live iPhone Camera view in center, "CGAffineTransformTranslate" not working
Posted
by Gavin
on Stack Overflow
See other posts from Stack Overflow
or by Gavin
Published on 2010-01-11T14:10:05Z
Indexed on
2010/06/05
18:52 UTC
Read the original article
Hit count: 421
Hi,
I have a little problem which I could not solve. I really hope someone can help me with that. I wanted to resize the live camera view and place it in the center, using the following code below:
picker.cameraViewTransform = CGAffineTransformScale(picker.cameraViewTransform, 0.5, 0.56206);
picker.cameraViewTransform = CGAffineTransformTranslate(picker.cameraViewTransform, 80, 120);
But all I got was a scaled 1/2 sized view on the top left of the screen. It seems as though "CGAffineTransformTranslate" does nothing at all. The translation didn't work even when I used:
picker.cameraViewTransform = CGAffineTransformMake(1, 0, 0, 1, 80, 120);
The translation portion seems to have no effect on the live camera view. Hope someone can enlighten me.
Thanks.
© Stack Overflow or respective owner