Instead of using CGRect, I made it work by passing x, y, width and height as parameters.
I've got collision testing working, I am trying something where the platform on the screen is 'solid', so it stops the player when the player tries to move through it. Here is my code:
if(y+height >= platy) {yVel = -1;}
if(y <= platy+platheight) {yVel = 1;}
if(x+width >= platx) {xVel = -1;}
if(x <= platx+platwidth) {xVel = 1;}
But it doesn't work! On two sides, the rectangle is 'solid'. On the other two, the player moves right through to the other side. Please help!