私の電話が絶えず振動するようにサポートされているこのコードがあります。 1振動後に停止します。私のタイマーに何か問題がありますか?私のタイマーは1ラウンド後に停止します
var timer: Timer?
@IBAction func button1(_ sender: UIButton) {
AudioServicesPlayAlertSound(kSystemSoundID_Vibrate)
timer?.invalidate()
timer = Timer.scheduledTimer(timeInterval: 0.1, target: self, selector: Selector(("doaction")), userInfo: nil, repeats: true)
}
どうしたのですか?助けて?私はまた、迅速にxcodeを使用しています。それが重要な場合は、iphone 7 plusをお持ちください。
私のiphoneのクラッシュを私は切断し –
を表示アプリケーションを実行しようとしたら、 'doaction'メソッドでお願いします。それは、タイマーが繰り返し呼び出すことです。 – matt