Switching view controllers as a container programmatically - Swift and OS X

Using Swift 2.0 for an OS X application (10.9), I want to programmatically switch the view controller (table view controller) as a container to another view controller (i.e. replace the table view controller with another view controller). This will happen when the “Install” button is clicked on any of the types of tabs, and some condition will be fulfilled (it is necessary to do this programmatically). I do not want to use segues (if only a custom segue that replaces a window, and does not open a modal, etc.).

I am starting very much with the development of Swift and mac, and I was not lucky to find a solution from a reliable and understandable source (for a beginner) for what I know should be quite simple.

enter image description here

+4
source share

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


All Articles