UITextField in UIAlertController (border, backgroundColor)

前端 未结 8 1833
陌清茗
陌清茗 2020-12-01 16:38

Here is a screenshot of a UIAlertController. I was just playing around custom fonts and textfield properties but I was unable to accomplish the fol

8条回答
  •  無奈伤痛
    2020-12-01 17:33

    Swift 2.0 version:

    for textField in alert.textFields! {
        if let container = textField.superview, let effectView = container.superview?.subviews.first where effectView is UIVisualEffectView {
           container.backgroundColor = UIColor.clearColor()
           effectView.removeFromSuperview()
        }
    }
    

提交回复
热议问题