UILabel *aLbel = ({
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(50, 50, 100, 100)];
label.text = @"你好";
label.backgroundColor = [UIColor redColor];
label;
});
[self.view addSubview:aLbel];
iOS开发零基础教程之UILabel的新初始化方法
最新推荐文章于 2024-03-06 12:14:09 发布