如果你按住按鈕A,你想隱藏viewA 我做了這個編碼。 class ViewController: UIViewController {
func longPress(gesture: UILongPressGestureRecognizer) {
//If button A was long pressed
if gesture.state == .began {
我有一個VC這樣 對我有嵌入UIButtons,我就點擊改變自己的形象的複選框。這是我的代碼 @IBOutlet weak var bestSellerButton: UIButton!
@IBOutlet weak var trendingButton: UIButton!
@IBOutlet weak var lowToHighButton: UIButton!
@IBOutlet we