How do I use cgsize make?

jwhyyou picture jwhyyou · Apr 26, 2014 · Viewed 38.7k times · Source

I have been trying to use cgsizemake as follows:

I'm trying to make the frame of my image a different size using cgrectmake instead of changing the coordinates.

So far I have tried

 maincharacter.frame = cgsizemake (14, 14); 

but I keep getting the error

assigning to cgrect from incompatible type CGsize

Answer

rmaddy picture rmaddy · Apr 26, 2014

One solution would be:

CGRect frame = maincharacter.frame;
frame.size = CGSizeMake(14, 14);
maincharacter.frame = frame;