一,效果图。
二,代码。
ViewController.m
class="cnblogs_code_copy" style="font-size: 18px">- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
//提示label
UILabel *alertLabel=[[UILabel alloc]initWithFrame:CGRectMake(0, 50, 320, 30)];
alertLabel.backgroundColor=[UIColor clearColor];
alertLabel.text=@"你可以通过在地图上拖动地标获取门店的详细地址";
alertLabel.textAlignment=NSTextAlignmentCenter;
alertLabel.textColor=[UIColor grayColor];
alertLabel.font=[UIFont systemFontOfSize:10];
[self.view addSubview:alertLabel];
}