swift 代码块

snapkit

  • make.top.equalTo(nameLabel.snp.bottom).offset(14)
    快捷键:mmtb

make.right.equalTo(arrowView.snp.left).offset(-6)
快捷键:mmrl

  • make.left.equalTo(tagView.snp.right).offset(5)
    快捷键:mmlr

  • make.top.equalTo(88)
    快捷键:mmt

  • make.bottom.equalTo(10)
    快捷键:mmb

  • make.left.equalTo(10)
    快捷键:mml

  • make.right.equalTo(-10)
    快捷键:mmr

  • make.centerX.equalTo(view)
    快捷键:mmx

  • make.centerX.equalTo(self)
    快捷键:mmxs

  • make.centerY.equalTo(view)
    快捷键:mmy

  • make.centerY.equalTo(self)
    快捷键:mmys

  • make.centerX.centerY.equalTo(backgroundIconView)
    快捷键:mmxy

  • make.size.equalTo(CGSize(width: 10, height: 10))
    快捷键:mms

  • make.height.equalTo(191)
    快捷键:mmh

  • make.width.equalTo(191)
    快捷键:mmw

  • view.snp.makeConstraints { (make) in

}
快捷键:mmm

  • view.addSubview(orderView)
    快捷键:vdd

UIKit

  • 快捷键:lll
lazy var titleLabel: UILabel = {
        let label = UILabel()
        label.textColor = bm_hexColor("#666666")
        label.font = bm_font(14)
        label.text = ""
        return label
}()
  • 快捷键:llb
lazy var maskButton: UIButton = {
        let button = UIButton()
        button.backgroundColor = UIColor.clear
        return button
}()
  • 快捷键:lli
lazy var arrowView: UIImageView = {
        let imgV = UIImageView(image: UIImage(named: ""))
        imgV.sizeToFit()
        return imgV
}()
  • 快捷键:llv
lazy var tagView: UIView = {
        let view = UIView()
        view.backgroundColor = bm_hexColor("#F95F13")
        return view
}()
  • 快捷键:llc
    lazy var waitCollectionView: UICollectionView = {
        let waitItemWidth = (bmScreenWidth - CGFloat(orderMargin * 2)) / 4
        let waitItemSize = CGSize(width: waitItemWidth, height: 70.0)
        
        let layout = UICollectionViewFlowLayout()
        layout.itemSize = waitItemSize
        layout.minimumLineSpacing = 0
        layout.minimumInteritemSpacing = 0
        
        let view = UICollectionView(frame: .zero, collectionViewLayout: layout)
        view.delegate = self
        view.dataSource = self
        view.tag = 1
        view.backgroundColor = UIColor.white
        return view
    }()
  • 快捷键:lltv
lazy var tableView: UITableView = {
        let tv = UITableView()
        tv.dataSource = self
        tv.delegate = self
        tv.backgroundColor = .white
        tv.separatorStyle = .none
        return tv
}()
  • 快捷键:lltf
lazy var textField: UITextField = {
        let tf = UITextField()
        tf.clearButtonMode = .always
        tf.backgroundColor = .white
        return tf
}()

闭包

  • () -> ()
    快捷键:ffc

  • (() -> ())?
    快捷键:ffco

你可能感兴趣的:(swift 代码块)