Swift-UIKit(UISearchTextField).png

import UIKit
class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        let MySearchTextField = UISearchTextField()
        MySearchTextField.frame = CGRect(x: 135, y: 50, width: 160, height: 35)
        // 输入框提示内容
        MySearchTextField.placeholder = "请输入关键词"
        view.addSubview(MySearchTextField)
//        let MyImage = UIImage()
        // Do any additional setup after loading the view.
    }
}

SwiftUIKitiOSUISearchTextField

4 条评论

  1. vqerrrpfrd
    2024-10-31 18:49
    回复

    你的文章让我感受到了艺术的魅力,谢谢!http://www.luckstar168.com

  2. molajzgbpy
    2024-10-19 14:57
    回复

    哈哈哈,写的太好了https://www.cscnn.com/

  3. jnpmnuvcem
    2024-10-04 21:39
    回复

    看的我热血沸腾啊https://www.ea55.com/

  4. pxeeeizzza
    2024-09-27 13:09
    回复

    怎么收藏这篇文章?

添加新评论