一、xcode11 新建swift5 项目
参考:https://www.xugj520.cn/archives/xcode-swift.html
二、接入 SDK
在项目目录下执行
$ pod init在 Podfile 中指定:
pod 'QMUIKit'在项目目录终端下执行:
$ pod install三、新建桥接的头文件

并添加到
四、在头文件中导入
#import <QMUIKit/QMUIKit.h>五、在swift文件中使用QMUI
import UIKit
class ViewController: UIViewController {
    override func viewDidLoad() {
        super.viewDidLoad()
        self.title = "aaa"
        self.view.backgroundColor = UIColor(hue: 0.50, saturation: 0.20, brightness: 0.86, alpha: 1.00)
        
        let button = QMUIButton();
        button.frame = CGRect(x: 10, y: 210, width: 300, height: 50)
        button.backgroundColor = UIColor.red
        button.addTarget(self, action: #selector(buttonClick), for: .touchUpInside)
        self.view.addSubview(button)
    }
    
    @objc func buttonClick(){
        print("被点击了")
    }
}