我如何使用 SnapKit 在 ScrollView 中垂直居中下方的按钮数组。
for i in 0..<3 {
itemCount = i
let aButton = UIButton(type: .custom)
aButton.frame = CGRect(x: xCoord, y: yCoord, width: buttonWidth, height: buttonHeight)
aButton.backgroundColor = UIColor.blue
aButton.layer.cornerRadius = aButton.frame.size.width / 2
aButton.clipsToBounds = true
xCoord += buttonWidth + gapBetweenButtons
aScrollView.addSubview(aButton)
aButton.snp.makeConstraints { (make) in
make.center.equalTo(aScrollView)
}
}