// 先可通过UIApplication的setStatusBarOrientation方法更改状态条方向
// 然后以下代码实现强制触发shouldAutorotateToInterfaceOrientation
UIWindow *window = [[UIApplication shareApplication] keyWindow];
UIView *view = [window.subviews objectAtIndex:0];
[view removeFromSuperview];
[window addSubview:view];
强行触发shouldAutorotateToInterfaceOrientation
最新推荐文章于 2022-09-20 16:51:25 发布