iOS13的白色问题与UIKit的textColor [英] iOS13 White Color issue with textColor of UIKit

查看:133
本文介绍了iOS13的白色问题与UIKit的textColor的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iOS13应用程序布局无法正常工作之前.苹果在 iOS13.1 中更新了最新的深色主题和浅色主题后,它们如此,现有应用程序中面临许多问题.就像UITextField placeHolder和whiteColor以前是blackColor一样,UIDatePicker textColor和whiteColor以前是blackColor一样.

Before iOS13 application Layout working as excepted. After latest dark theme and light theme update by apple in iOS13.1, Their is so, many issue facing in existing application. Like UITextField placeHolder with whiteColor which are previously blackColor, UIDatePicker textColor with whiteColor which are previously blackColor.

有人可以帮我解决下面的DatePicker文本颜色问题.这是不可见的,因为whiteColor,TextColor应该为blackColor.

Can anyone help me with below DatePicker text color issue. which are invisible because whiteColor, TextColor should be blackColor.

任何帮助表示赞赏. 谢谢你.

Any help appreciated. Thank you.

推荐答案

使用iOS 13的Swift 5

通用解决方案,对我的整个应用程序有效,无需执行 任何文件特定的更改.

Common solution which is work for my whole application without perform any file specific changes.

Xcode 11 或更高版本工作,之前的版本上传失败 Xcode 11 的版本.

Work for Xcode 11 or higher version, Build upload fail on prior version of Xcode 11.

在info.plist文件中将UIUserInterfaceStyle设置为1.

Set UIUserInterfaceStyle to 1 in your info.plist file.

OR

AppDelegate.swift

AppDelegate.swift

    if #available(iOS 13.0, *) {
        window?.overrideUserInterfaceStyle = .light
    } else {
        // Fallback on earlier versions
    }

我们必须为任何现有的用户界面样式指定light 应用程序.

We have to specify user interface style light for any existing application.

这篇关于iOS13的白色问题与UIKit的textColor的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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