ViewController is not displayed even if the segue function was started

I have a TableViewController and I would like to call segue in my navigation bar. I created a segue in the storyboard before my new ViewController . However, if I click on a panel button element, the view will not appear.

Instead, the panel button element becomes greyed out, and the application freezes. There is no error message, and the application is also not crashing. The prepareForSegue method in my TableViewController also called

 override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { print("prepare for segue called") print("destination view controller = \(segue.destinationViewController.description)") } 

I have done the following things:

  • created a custom Control class class for the second screen (in my storyboard and as a .swift file). I assigned the appropriate ViewController in the storyboard to my custom view controller in the Identity inspector
  • created IBAction for the click event of a button and starts with the software. The result remains the same. prepareForSegue . The destionationViewController rule but does not appear. After that I deleted this IBAction .

My view view controller is as follows

 class EnterUserDataViewController : UIViewController { override func viewDidLoad() { super.viewDidLoad() print("EnterUserDataViewController viewDidLoad called") } } 

viewDidLoad will never be called even if the correct session has been activated.

Can someone please give me a hint why this is happening?

My plan. I am trying to create a segue from ExtraViewController for EnterUserDataViewController

Segue

+5
source share
1 answer

Wouldn't you be able to set a rogue milestone somewhere?

If I set a breakpoint somewhere in the view's load cycle, it recreates the exact symptoms that you describe.

0
source

Source: https://habr.com/ru/post/1236607/


All Articles