设置frame属性值时使用CGRectMake,设置center属性值时使用CGPointMake.
UILabel *label=[[UILabel alloc]initWithFrame:CGRectZero];
//frame的设置
label.frame=CGRectMake(0, 0, 200, 50);
//center设置
label.center=CGPointMake(160, 240);
//frame的参照
NSLog(@"x=%f",label.frame.origin.x);
NSLog(@"y=%f",label.frame.origin.y);
NSLog(@"width=%f",label.frame.size.width);
NSLog(@"height=%f",label.frame.size.height);
//center的参照
NSLog(@"x=%f",label.center.x);
NSLog(@"y=%f",label.center.y);