2016-10-22 33 views

回答

0

聽證閒來無事,我即興創造了新的bool變量。然後我使用if語句通過訪問hashValue來正確設置它。

if self.option1.switchState.hashValue == 1 { 
     option1Value = false 
    } else { 
     option1Value = true 
    } 
0

你可以只運行print(not switch.switchState)

相關問題