ios - 如何增加 uiswitch Thumb 大小

标签 ios swift

我试图增加 UISwitch 的拇指大小 我试图通过在图像上设置来增加拇指大小,但图像没有显示。

我试试这个:

uiSwitch.onImage = UIImage(named: "sing") 

我想要这样的开关

here is image

最佳答案

if let thumbView = try (mySwitch.subviews[0].subviews[3] as? UIImageView) {
       thumbView.transform = CGAffineTransform(scaleX:1.5, y: 1.5)
   }

关于ios - 如何增加 uiswitch Thumb 大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46174701/

相关文章:

c++ - 交付具有其他依赖项的 xcode 框架

ios - 在 ios swift 的 NotificationService 中播放流媒体 URL

快速播放图库中的视频

ios - definesPresentationContext 应设置为 YES,但在与 UISearchController 结合使用时会中断导航

swift - 似乎无法将框架导入 Xcode 10.2.1 中的当前项目

javascript - React Native软件如何更新详解

ios - 防止在 UITextField 中编辑文本并在使用 inputView 时隐藏光标/插入符号/放大镜

ios - Xamarin.Forms 和 iOS : how to combine UseSafeArea and a background image?

Swift.Streaming 来自 url 的音频,错误代码为 -999 "cancelled"

ios - UIView.endEditing中的 "force"参数有什么作用?