一,效果图。
二,代码。
ViewController.m
- (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]; }
时间: 2024-10-15 06:54:41