改变状态栏颜色:
- (UIStatusBarStyle)preferredStatusBarStyle{ return UIStatusBarStyleLightContent; }
隐藏状态栏:
- (BOOL)prefersStatusBarHidden{ return YES; }
控件显示到最上方
[self.view bringSubviewToFront:self._textTitle];
清除superView中的所有控件
[self.questionSelectView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
添加一个延迟任务:延迟一秒执行 nextQuestionOnclick方法
[self performSelector:@selector(nextQuestionOnclick:) withObject:nil afterDelay:1];
创建一个提示框
UIAlertController *alertController= [UIAlertController alertControllerWithTitle:@"提示" message:@"恭喜你通关" preferredStyle:UIAlertControllerStyleAlert]; UIAlertAction *okAlert=[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { }]; [alertController addAction:okAlert]; [self presentViewController:alertController animated:YES completion:nil];