Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何以编程方式制作 UILabel?
UILabel *myLabel = [[UILabel alloc] initWithFrame:CGRectMake (50, 100, 200, 100)]; myLabel.text = @"Lorem..."; //add text to your label [self.view addSubview:myLabel]; //add label to your view
那应该可以帮助您。
为什么要问这个简单的问题?如果你搜索它,点击谷歌上的第一个结果,你就会得到答案。