ios - Objective C: Resizing a UIImageView -
i'm trying resize uiimageview. tried directly edit frame of image view so
verticalbar.frame = cgrectmake(verticalbar.frame.origin.x, verticalbar.frame.origin.y, verticalbar.frame.size.width, verticalbar.frame.size.height);
yet when didn't change of values image contorted greatly. mean had rotated rectangle(i used cgafflinetransformmakerotation) @ 45 degree angle when tried editing frame shown above rectangle became 5 times wide. not sure problem is. great!
from docs uiview frame
:
however, if transform property contains non-identity transform, value of frame property undefined , should not modified. in case, can reposition view using center property , adjust size using bounds property instead.
so either leave transform in place , update image view's center
, bounds
, or reset transform set frame
.
Comments
Post a Comment