๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
โ—๏ธError

[Error ํ•ด๊ฒฐ๋ฒ• ํฌํ•จ] Attempt to present on <> from <> which is already presenting <>

by Fomagran ๐Ÿ’ป 2021. 5. 13.
728x90
๋ฐ˜์‘ํ˜•

 

์•ˆ๋…•ํ•˜์„ธ์š” Foma ์ž…๋‹ˆ๋‹ค!

 

์˜ค๋Š˜ ๋งŒ๋‚œ ์—๋Ÿฌ๋Š” ๋ทฐ์ปจํŠธ๋กค๋Ÿฌ์—์„œ dismiss๋˜๋ฉด ๋”œ๋ฆฌ๊ฒŒ์ดํŠธ๋กœ ์‹ ํ˜ธ๋ฅผ ๋ณด๋‚ด์„œ ์„ธ๊ทธ์™€ ์—ฐ๊ฒฐ๋œ ๋‹ค๋ฅธ ๋ทฐ์ปจํŠธ๋กค๋Ÿฌ๋กœ

 

์ด๋™ํ•˜๊ฒŒ ๊ตฌํ˜„ํ•˜๋ ค๊ณ  ํ–ˆ๋Š”๋ฐ ์œ„์™€ ๊ฐ™์€ ์˜ค๋ฅ˜๊ฐ€ ๋–ด์Šต๋‹ˆ๋‹ค.

 

์›์ธ์„ ์ฐพ์•„๋ณด๋‹ˆ ํ˜„์žฌ ๋ทฐ์ปจํŠธ๋กค๋Ÿฌ๊ฐ€ rootViewController๊ฐ€ ์•„๋‹ˆ์—ฌ์„œ ์ƒ๊ธด ๋ฌธ์ œ๋ผ๊ณ  ํ•ด์š”.

 

์Šคํƒ์˜ค๋ฒ„ํ”Œ๋กœ์šฐ์—๋Š” ์ œ์ผ ์ƒ์œ„์ธต์— ์žˆ๋Š” ๋ทฐ์ปจํŠธ๋กค๋Ÿฌ๋ฅผ ์ฐพ์•„์„œ ๊ฑฐ๊ธฐ์„œ ์ด๋™ํ•ด๋ผ ์ด๋Ÿฐ์‹์œผ๋กœ ํ•ด๊ฒฐ๋ฒ•์ด ์žˆ๋Š”๋ฐ

 

์ €๋Š” ์•ˆ๋˜๋”๋ผ๊ตฌ์š” ..ใ…œ 

 

์ œ๊ฐ€ ์ฐพ์•„๋‚ธ ํ•ด๊ฒฐ๋ฒ•์€ performSegue๋กœ ์ด๋™ํ•˜๊ธฐ ์ „์— 1์ดˆ ๋”œ๋ ˆ์ด๋ฅผ ์ฃผ๊ณ  ์ด๋™์‹œํ‚ค๋‹ˆ ํ•ด๊ฒฐ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

 

extension ViewController:OtherViewControllerDelegate {
    func someFunction() {
        DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
            self.performSegue(withIdentifier: "identifier", sender: nil)
        }
    }
}
728x90
๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€