1、定时器
controller
[self performSelector:@selector(nextQuestion:) withObject:nil afterDelay:0.5];
2、让数组中每个对象调用某个方法
[self.optionsView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
3、将一个图层移到最前面
[self.view bringSubviewToFront:self.iconBtn];
4、控制状态栏的样式 重写方法
/**
* 控制状态栏的样式
*/
- (UIStatusBarStyle)preferredStatusBarStyle
{
// 白色
return UIStatusBarStyleLightContent;
}
controller
[self performSelector:@selector(nextQuestion:) withObject:nil afterDelay:0.5];
2、让数组中每个对象调用某个方法
[self.optionsView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
3、将一个图层移到最前面
[self.view bringSubviewToFront:self.iconBtn];
4、控制状态栏的样式 重写方法
/**
* 控制状态栏的样式
*/
- (UIStatusBarStyle)preferredStatusBarStyle
{
// 白色
return UIStatusBarStyleLightContent;
}
本文介绍了iOS开发中的四个实用技巧:使用定时器实现延迟操作、批量调用子视图方法、调整视图层级以及自定义状态栏样式。
1055

被折叠的 条评论
为什么被折叠?



