I am trying to figure out the correct viewcontroller / segue structure for my project and I need help.
When " B " is displayed from " A ", it checks to see if the statement is true. Only if true, " C " should be immediately presented instead of " B ". The user continues to " D ", and disconnect from " D " disconnect to " B ".
I could check the if-statement in viewDidAppear()from B ', but then the view will load first a few milliseconds before loading the C view manager . This does not look good.
viewDidAppear()
If I try to make an if-statement in viewDidLoad(), I get an error message:
viewDidLoad()
An attempt to present a ' C ' on ' B whose view is not in the window hierarchy
Maybe there is a better way to do this?
segues, ViewController, . Segues , ViewController , viewDidLoad, .
viewDidLoad
ViewController segues - , " ", A->B->C , B, A->C. segue C A B.
A->B->C
B
A->C
C
A
, , unind segue ViewController, . , , "" . , "" , , segue say D->B, "" B, segues A->C->D->B.
D->B
A->C->D->B
, . viewcontroller, - " B", " C". , :
func switchToB() { containerB.isHidden = false containerC.isHidden = true } func switchToC() { containerB.isHidden = true containerC.isHidden = false }
' D' , switchToC().
switchToC()
Source: https://habr.com/ru/post/1684121/More articles:Saving an encrypted file locally that is created using JavaScript - javascriptUsing GridSearchCV with a set of multiple counter errors - pythonstrange behavior of fscanf function - matlabHaskell Stack Setup - Unable to recognize CPP program - c ++Safe and general serialization in Python - jsonRails 5.1 запускает системные тесты и обычные тесты с помощью одной команды - ruby-on-railsMySQL stack stack - mysqlОшибка таймаута. При запуске script на браузере Chrome без хронометра с помощью Selenium Webdriver с Python - pythonPython's preferred way to reset a class - pythonCss blur effect on live background - javascriptAll Articles