一.效果图 二.代码 - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. self.title = @"背景颜色的随机显示"; } //点击视图,视图颜色随机更改 - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent
iOS Programming View and View Hierarchy 视图和视图等级 1.1(1)File → New → Project.. From the iOS section, select Application, choose the Empty Application template, and click Next. 1.2 View Basics (1)A view is an instance of UIView or one of its subclasse