---
# System prepended metadata

title: UI 創建方式

---

# UI 創建方式

1. 直接用拉控件
![](https://i.imgur.com/o6wK8XI.png)

2. code創建
```
創建
UILabel *label = [UILabel new];
添加View
[self.label addSubview: label];
```


![](https://i.imgur.com/2qJfH4w.png)
![](https://i.imgur.com/OjLBzrr.png)

