I have a struct where I define the size (width, height) of a square, and I don’t know why the code doesn’t work well. Here’s the code that I’m using:
.h
struct size{
int width;
int height;
};
.m
struct size a;
a.width = 508;
a.height = 686;
// I use it here.
Any ideas?
If you want to use Apple provided types, you have:
CGSizefor sizes (withwidthandheight)CGPointfor locations (withxandy)CGRect, which combines the two.Example usage: