开发者

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


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;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜