模拟@IBAction中的另一个点击

时间:2017-01-08 02:40:05

标签: ios swift3

@IBAction func submitButtonDown(_ sender: AnyObject) {

if !self.arrivalCityField.hasText {

    singleTon.shouldNotSubmitForm()

}

if singleTon.canSubmitForm() {
    self.endEditing(true)
    self.submitButton.sendActions(for: .touchUpInside)  //Ends up looping     forever, I need this to run after the current execution has finished but only once... (that is tap once, wait, then programatically tap another time.
}

IBAction功能运行完毕后,有没有办法在同一个按钮上模拟另一个触摸?

我尝试过使用GCD,但它会继续循环播放......

0 个答案:

没有答案