【问题标题】:remove UISwitch thumb shadow effect - swift删除 UISwitch 拇指阴影效果 - swift
【发布时间】:2017-11-08 10:04:14
【问题描述】:

我正在尝试移除 UISwitch 上存在的阴影效果。有什么办法可以消除这种阴影效果?

【问题讨论】:

  • 去除阴影是什么意思?
  • 你在图片中看到的那个阴影效果,在拇指的左边@ShauketSheikh
  • 不,不是那一行。拇指下方有阴影效果@UmaMadhavi

标签: swift uiswitch


【解决方案1】:

似乎使用 thumbTintColor 去除阴影效果

【讨论】:

    【解决方案2】:

    对于 Swift 3/4:

    使用

    yourSwitch.thumbTintColor = .clear
    

    对于 Objective-C

    yourswitch setThumbTintColor: [UIColor clearColor];
    

    希望对你有用。

    【讨论】:

    • 这会删除我的 uiswitch 按钮。为什么会这样?
    猜你喜欢
    • 2022-11-09
    • 2014-04-08
    • 1970-01-01
    • 1970-01-01
    • 2015-03-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多