問題タブ [dispatch-queue]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
262 参照

ios - ディスパッチキュー内で performSegue() を手動で制御できない

計算用のバックグラウンド スレッドと UI 更新用のメイン スレッドを実行するボタン オブジェクトがあります。すべてが完了したら、 を使用して別のビュー コントローラーに移動したいのですperformSegue(withIdentifier: "thirdViewController", sender: self)が、 では動作しませんdispatchQueueperformSegue()ビューコントローラーを切り替えるためにこれまで何度も使用してきましたが、いつでも手動で制御できました。代わりに、最初に計算を完了することなく、ほぼ瞬時に次の ViewController に移動します。

self.present(thirdViewController(), animated: true, completion: nil)を使用しself.navigationController?.pushViewController(thirdViewController(), animated: true)てViewControllerを変更しようとしましたが、黒い画面が表示されました。