This discussion is archived
7673 Views 5 Replies Latest reply: Feb 4, 2009 8:09 PM by TheSilence
Currently Being ModeratedSep 16, 2008 7:46 AM (in response to dimraft)
transform = CGAffineTransformIdentity;
transform = CGAffineTransformMakeTranslation(imageSize.width, imageSize.height);
transform = CGAffineTransformRotate(transform, 1.57);
someImage.transform = transform;
Replace 1.57 with a degrees to radians method.MacBook, Mac OS X (10.5.4), iPhone 3G 16GB
Currently Being ModeratedJan 22, 2009 4:13 AM (in response to kagakuninja)It is necessary to use CGAffineTransformMakeTranslation before CGAffineTransformMakeRotation , i an only using makeRotation and not getting any effect. Is this the reason ?
help me .
thanksMac OS X (10.4.2)
Currently Being ModeratedFeb 4, 2009 8:09 PM (in response to Narender.mudgal)It is necessary. The rotation is around the origin of the image coordinates, which is in the lower left corner I believe. By translating first, you're moving the image to the upper right and then rotating properly so that the image not only will be rotated but centered properly.Mac Mini, Mac OS X (10.5.4)