Scene is unavailable due to lack of entry points ... Custom button

I am new to xCode programming. I made a snapchat login screen. Currently I started with two view controllers for login and then for registration, but I changed it, so I start with an internal view controller which has two custom buttons that I made. Check out the picture. I want it so that when you clear the login button, you get to the login screen, and when you click the register button, you get to the login screen.

I'm not sure what I am doing wrong. I want to! [Enter image description here] [1]

My app delegate has the following:

http://i.stack.imgur.com/8fWT4.png http://i.stack.imgur.com/b9mfN.png

I just don't understand why I keep getting the following error: The scene is not available due to missing entry points and does not have an identifier to access at runtime via -instantiateViewControllerWithIdentifier :.

+3


source to share


2 answers


If you don't go to the view in question, you will need to provide the Storyboard ID to it in order to associate the nib with the appropriate class. Go into storyboard and make sure you set the class ID and storyboards. If you go to a class make sure you provide your segue id. But if not, you can do something like:

YourViewController *vc = (YourViewController*)[self.storyboard instantiateViewControllerWithIndentifier:@"YourStoryboardIdentifier"];

[self presentViewController:vc animated:YES completion:^{}];// Or however you want to present it. ie pushing onto the navigation stack

      



enter image description here

+1


source


You can use this code:



WaitingRoomVC *ivc=[self.storyboard instantiateViewControllerWithIdentifier:@"waiting"];
[self.navigationController pushViewController:ivc animated:YES];

      

0


source







All Articles