我的应用程序要求是iOS 12.0兼容,并有一个选项卡栏。因为iOS 13.0,所以可以使用UITabBarAppearance()来改变它的外观。在故事板中,我在属性检查器中选择了Standard作为Appearances。这使得应用程序在使用iOS 12.0时崩溃。
如何以编程方式禁用标准外观?
if #available(iOS 13.0, *) {
// code for iOS >= 13.0
} else {
// code for iOS < 13.0
// Here I would like to disable the storyboard
我试图在我的iOS 13.0应用程序中更改状态栏样式,但当我使用代码时;
UIApplication.shared.statusBarStyle = .lightContent
我在Xcode中得到警告;
'statusBarStyle' was deprecated in iOS 13.0: Use the statusBarManager property of the window scene instead
问题是属性statusBarManager?.statusBarStyle只是一个get属性,所以如何以编程方式更改状态栏样式?
我一直在慢慢地学习如何使用iOS构建Swift应用程序,并收到了一篇文章,这篇文章是由为什么一直从事专业工作的人发送的:。虽然我采用了学习如何以编程方式构建iOS应用程序的方法,但我确实认为故事板在iOS开发中占有一席之地。我试图通过为每个视图( w/其自身的Marin Benčević )创建一个新的故事板来实现ViewController思想。不过,我很难把这件事联系起来。我不断地遇到同样的错误:
Failed to instantiate the default view controller for UIMainStoryboardFile 'LoginViewControll