hello,
ok so im using story boards and swift. basically i hold CONTROL and drag from a button to my second view controller i made and click "present modally" option so now my second view controller shows once the button is clicked.
so my main question is.. i would like to close the second view controller that i opened through code so once my function has executed at the end i would like the close the second view controller screen and go back to the main view controller screen.
how is this done?
i am currently using this line of code on my logout function
so is there a way to close the opened view controller that was opened?
ok so im using story boards and swift. basically i hold CONTROL and drag from a button to my second view controller i made and click "present modally" option so now my second view controller shows once the button is clicked.
so my main question is.. i would like to close the second view controller that i opened through code so once my function has executed at the end i would like the close the second view controller screen and go back to the main view controller screen.
how is this done?
i am currently using this line of code on my logout function
Code Block self.present( UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "mainPAGE") as UIViewController, animated: true, completion: nil)
so is there a way to close the opened view controller that was opened?