[英]Controlling aspects of a button from another button press - Swift
拖動刪除按鈕以創建一個出口,例如
@IBOutlet weak var removeButton:UIButton!
然后在resetButton的動作中執行此操作
removeButton.backgroundColor = .red
您必須獲得removeButton的引用。 就像您為removeButton創建IBAction一樣,創建removeButton的IBOutlet。 然后在resetButton函數中只需更改removeButton的背景顏色
removeButton.backgroundColor = .red
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.