Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CGPointMake explanation needed?

could anyone explain to me what CGPointMake does please?

image.position = CGPointMake(80,200);
id go    = [MoveTo actionWithDuration:2 position:CGPointMake(190,460)];

for example this syntax above. I am not quite sure

like image 889
Rocker Avatar asked Nov 17 '09 03:11

Rocker


1 Answers

It's an inline function that populates a CGPoint struct with the values you pass in.

Command-double-click CGPointMake in your code and you will be taken to the header, which shows the function:

CG_INLINE CGPoint
CGPointMake(CGFloat x, CGFloat y)
{
    CGPoint p; p.x = x; p.y = y; return p;
}
like image 141
Rob Keniger Avatar answered Sep 23 '22 02:09

Rob Keniger