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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -