P
P
pryaniq2015-07-02 18:03:59
iOS
pryaniq, 2015-07-02 18:03:59

How to move from one ViewController to another ViewController without using Storyboard?

There is a library that in my ViewController runs over its own. There is a button in the library VC. How do I navigate from a library VC to my VC on a button click without using a Storyboard? Function for button:

func didSelectButton(sender: UIBarButtonItem) {
        
    }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MultiCubics, 2015-07-02
@MultiCubics

I can suggest the following:

-(void) createSecondViewController{
    
    NSLog(@"createSecondViewController is called");
    
    DTSecondViewController* secondViewController=[[DTSecondViewController alloc]initWithGradeAndArray:self.grade mutArr:self.coefficientsValuesArray];// Кастомная
    
    secondViewController.view.backgroundColor     =[UIColor lightGrayColor];
    [self presentViewController:secondViewController animated:YES completion:^{
        NSLog(@"present VC is chacged");
    } ];
}//createSecondViewController

I think you can find a similar method in Swift))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question