Guión gráfico sin NavigationController

I am creating a new application using xcode5. xcode5 automatically adds a storyboard to the application. i don't want to use navigation controller in my application can you please guide me how can i use storyboard with xib , but i don't wanna use navigation controller in my application.

preguntado el 12 de febrero de 14 a las 07:02

Select the navigation controller in the storyboard and press delete. That easy. -

yes, i did that but i have a login page on successful authentication i want to load a new viewcontroller(with xib) on the device. how to add new viewcontroller to the scene in storyboard and show it to user -

You can use a modal segue. Create a new ViewController in your storyboard, and ctrl-drag from the first to the second. Then select modal segue. -

i have to add modal segue to the viewcontroller or to the login button, if to the login button how can i add condition that on successful authentication it should show the second view controller -

if you create a viewcontroller with xib, you can't add it to the scene in storyboard. You can add a viewcontroller in storyboard and retrieve it using instantiateViewControllerWithIdentifier:. -

1 Respuestas

1、 Create a segue between two view controller.

ctrl drag from aquí in source view controller in storyboard to destination view controller

2、 Give an identifier to the segue, let say it "justTest"

3、 when you want to show the second view controller, use [self performSegueWithIdentifier:@"justTest" sender:self]; in source view controller.

BTW xib and storyboard are different file types while Interface builder is a tool to help you arrange your UI elements.

Respondido 12 Feb 14, 08:02

hi thanks for your help one more query i have a back button at the second scene how to remove this scene when back button is clicked? - Anshul

@Anshul aquí hay un artículo, see "Using Delegation to Communicate with Other Controllers" section - KudoCC

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.