在XCode13之前的系统里,程序启动,使用下面3句话,加载TabBarController的一系列页面都是正常的。
但是使用XCode13编译之后,只有第一个页面正常,切换其他Tab均为显示不正常,经过测试,问题出在第一句。
[window addSubview:tabBarController.view];
self.window.rootViewController=tabBarController;//ios 6 support screen auto rotate
[window makeKeyAndVisible];
解决方法,屏蔽掉第一行。
//[window addSubview:tabBarController.view];
self.window.rootViewController=tabBarController;//ios 6 support screen auto rotate
[window makeKeyAndVisible];
这样Tab系统恢复正常。