I know that named colors are supported from 11.0, but our project targets iOS 9.0, and we were able to compile it using Xcode 9.0 / 9.1, because named colors were used only in the storyboard, and not at run time.
After switching to Xcode 9.2, the project does not compile:
named colors do not work until iOS 11.0
It seems that the problem is new, I did not find that anyone has the same problem.
, , iOS 11, , iOS 11 check, .
if #available(iOS 11.0, *) { view.backgroundColor = UIColor(named:"CustomColor") } else { // Fallback on earlier versions view.backgroundColor = .white }
Source: https://habr.com/ru/post/1690897/More articles:Symfony 4 fosuserbundle - symfonyScan components in dynamically loaded classes - javaNested Json deserialize C # - jsonшаблонная специализация для std:: atomic & - c++Cropping an image using ImageProcessor not running on the server - asp.net-mvcКак динамически загружать json-схему в typescript с помощью webpack - webpackHow to magically get the Object key? - javascriptКак предотвратить ленивую свернутую нейронную сеть? - machine-learningHow to return a DataSnapshot value as a result of a method? - javaKubernetes Controller vs. Kubernetes Operator? - kubernetesAll Articles