【问题标题】:Change tableview cell background color when dragged拖动时更改表格视图单元格背景颜色
【发布时间】:2019-10-08 21:06:57
【问题描述】:

我想为我的 tableview 单元格选择暗模式,但是当我拖动单元格对它们重新排序时,它具有深色背景颜色,我无法更改它。

self.overrideUserInterfaceStyle = .light

设置 overrideUserInterfaceStyle 不起作用

【问题讨论】:

  • self.view.backgroundColor = .white 应该,如果你已经覆盖了系统变量,解决这个问题。
  • 如果你打开暗模式,它不会工作

标签: ios swift


【解决方案1】:

改变你的 AppDelegate

        window = UIWindow(frame: UIScreen.main.bounds)
    guard let window = window else { return false }
    if #available(iOS 13.0, *) {
        window.overrideUserInterfaceStyle = .light
    }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-06-15
    • 1970-01-01
    • 1970-01-01
    • 2011-09-24
    • 2013-04-12
    • 2021-10-31
    • 1970-01-01
    • 2015-10-09
    相关资源
    最近更新 更多