【代码笔记】iOS-长条label

一,效果图。

技术分享

二,代码。

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]; }
复制代码

相关文章