xcode - When I rotate a imageView, size shrinks -


enter image description here

above image view before executing following code.

@interface viewcontroller () @property (nonatomic, weak) iboutlet uiview *layerview; @end   @implementation viewcontroller @synthesize layerview;  - (void)viewdidload {     [super viewdidload];     // additional setup after loading view, typically nib.      cgaffinetransform transform = cgaffinetransformmakerotation(m_pi_4);     self.layerview.layer.affinetransform = transform; }  ... //  more code 

enter image description here

and, above image view after executing code. want snowman rotated same size. but, reason it's giving me small snowman... can notice bug?

layers use catransform3d, not cgaffinetransform. 2 not interchangeable.

you should getting compiler warning code.

there equivalent functions manipulating catransform3d. in case want catransform3dmakerotation. method rotates around 3d vector. want pass in 0 x , y, , 1 z of vector. make layer perform flat 2d rotation code cgaffinetransform applied view.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -