带有Xcode 11 beta的iOS 11上的命名颜色问题 [英] Issues with named colors on iOS 11 with Xcode 11 beta

查看:66
本文介绍了带有Xcode 11 beta的iOS 11上的命名颜色问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在iOS应用中实现暗模式.为此,我需要使用命名的颜色,但是遇到了一些麻烦.在明暗模式之间切换时,在iOS 13模拟器上一切正常,并且颜色在iOS 12模拟器中也正确.当我尝试在iOS 11模拟器上运行我的应用程序时出现问题.我在情节提要中使用的所有命名颜色都默认为深色版本,当我尝试在代码中访问命名颜色时,结果为nil.只是想知道是否还有其他人遇到过

I am trying to implement dark mode in my iOS app. I need to use named colors in order to do this, but I've run into a bit of a snag. Everything works fine on the iOS 13 simulator when switching between light and dark mode, and the colors are also correct in the iOS 12 simulator. The problem occurs when I try to run my app on an iOS 11 simulator. Any named colors that I've used in the storyboard default to the dark version of the color, and when I try to access a named color in code I get nil. Just wondering if anyone else has run into this

推荐答案

Apple似乎知道它.

It seems that Apple know of it.

引用来自 https://developer.apple.com/ios/submit/

请注意,使用Xcode 11使用命名颜色构建的应用程序可能会应用运行时遇到查找失败(不返回任何值)的情况在iOS 11或更早版本上.这将在以后的Xcode更新中修复.至为避免此问题,请将最低部署目标提高到iOS 12或以后立即提交到App Store,或使用下一个Xcode进行重建可用的转基因候选种子.

Please note that apps built with Xcode 11 using named colors may experience lookup failures (with no value returned) when the app runs on iOS 11 or earlier. This will be fixed in a future Xcode update. To avoid this issue, raise the minimum deployment target to iOS 12 or later to submit to the App Store now, or rebuild with the next Xcode GM candidate seed when it’s available.

更新20190917

使用Xcode 11 GM种子2构建应用程序,其中包括适用于iOS的SDK13,iPadOS,watchOS 6,tvOS 12和macOS Catalina.从四月开始,2020年,需要构建提交给App Store的所有iOS应用使用iOS 13 SDK或更高版本.他们还必须支持全屏iPhone XS Max或12.9英寸iPad Pro(第三代)的设计,或以后.

Build your apps using Xcode 11 GM seed 2, which includes SDKs for iOS 13, iPadOS, watchOS 6, tvOS 12, and macOS Catalina. Starting April, 2020, all iOS apps submitted to the App Store will need to be built with the iOS 13 SDK or later. They must also support the all-screen design of iPhone XS Max or the 12.9-inch iPad Pro (3rd generation), or later.

这篇关于带有Xcode 11 beta的iOS 11上的命名颜色问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆