I have an object with an image and I would need to modify the dimensions of the image to a certain height (example 50px), but keeping the scale (the ratios).
UIImage *thumbImage = [UIImage imageNamed:@"peon.png"];
What would be a function that can do this?
You can use this function, for example:
I would recommend using Assets.xcassets, you have to put the image and then when assigning the image just like this UIImage *thumbImage = [UIImage imageNamed:@"pawn"];