Timeline for UIApplication.shared.delegate equivalent for SceneDelegate xcode11?
Current License: CC BY-SA 4.0
13 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 12 at 17:28 | comment | added | Igor Leonovich |
first(where:) should be used instead of for cycle here
|
|
Jun 8, 2023 at 16:56 | comment | added | HangarRash | @SerjRubens Where does the answer claim that it is only for single scene apps? As written, the answer clearly assumes multiple scenes. And that's the problem because it doesn't handle them correctly. BTW - a view controller has easy access to its scene. None of this code is needed. | |
Jun 8, 2023 at 16:30 | comment | added | Serj Rubens | @HangarRash, that's right but this answer is made for single scene apps ;) | |
Mar 6, 2023 at 6:30 | comment | added | HangarRash |
This doesn't work when an app has multiple active scenes. Let's say there is scene A, B, and C. Let's say scene A is the last one that was connected so currentScene is set to scene A. Now let's say a view controller in scene C wants to get its delegate. This code will return the delegate for scene A, not scene C.
|
|
Apr 19, 2022 at 18:25 | history | edited | slushy | CC BY-SA 4.0 |
deleted 12 characters in body
|
Feb 8, 2022 at 1:20 | comment | added | WikipediaBrown | This should be the selected answer! Also, it's funny so it's got that going for it. | |
Nov 19, 2021 at 18:07 | history | edited | slushy | CC BY-SA 4.0 |
deleted 68 characters in body
|
Nov 18, 2021 at 15:41 | history | edited | slushy | CC BY-SA 4.0 |
deleted 4 characters in body
|
Nov 18, 2021 at 14:47 | history | edited | slushy | CC BY-SA 4.0 |
added 9 characters in body
|
Oct 30, 2021 at 20:58 | history | edited | slushy | CC BY-SA 4.0 |
deleted 273 characters in body
|
Oct 30, 2021 at 18:07 | history | edited | slushy | CC BY-SA 4.0 |
added 15 characters in body
|
Oct 30, 2021 at 17:55 | history | edited | slushy | CC BY-SA 4.0 |
added 3 characters in body
|
Oct 30, 2021 at 17:49 | history | answered | slushy | CC BY-SA 4.0 |