x向右为正,y向下为正
1.y<0
UILabel *label=[[UILabelalloc] initWithFrame:CGRectMake(40,40, 250,50)];
label.backgroundColor=[UIColorclearColor];
label.textColor=[UIColorredColor];
label.text=@"和合谷";
label.shadowColor=[UIColorblueColor];
label.shadowOffset=CGSizeMake(0, -3);
20140506105608125.png
第二.y>0
UILabel *label=[[UILabelalloc] initWithFrame:CGRectMake(40,40, 250,50)];
label.backgroundColor=[UIColorclearColor];
label.textColor=[UIColorredColor];
label.text=@"和合谷";
label.shadowColor=[UIColorblueColor];
label.shadowOffset=CGSizeMake(0,3);
20140506105805656.png
第三、x>0
UILabel *label=[[UILabelalloc] initWithFrame:CGRectMake(40,40, 250,50)];
label.backgroundColor=[UIColorclearColor];
label.textColor=[UIColorredColor];
label.text=@"和合谷";
label.shadowColor=[UIColorblueColor];
label.shadowOffset=CGSizeMake(3,0);
[self.viewaddSubview:label];
20140506105933171.png
第四、x<0
UILabel *label=[[UILabelalloc] initWithFrame:CGRectMake(40,40, 250,50)];
label.backgroundColor=[UIColorclearColor];
label.textColor=[UIColorredColor];
label.text=@"和合谷";
label.shadowColor=[UIColorblueColor];
label.shadowOffset=CGSizeMake(-3,0);
20140506110142015.png
网友评论