5

Just last week I decided to dive into the world of Swift and Xcode development, and as of yesterday I am actively working on a new application. I have a lot of experience with Java Swing, but working with that is obviously a lot different than working with Apple's fancy interface builders and storyboards.

I am trying to develop a single-window application that has many different views that can be navigated by buttons. I tried to wrap my head around the way the storyboard works, but even after all my reading of the documentation I don't know really what I'm doing - I'm so used to working in hard code. It came to the point where I wrote my app's entire network layer just to avoid working with the interface.

Basically I have a set of different NSViewControllers, each with references to a few of their components (buttons, labels, etc) and I want certain buttons to be able to change the current view controller (preferably with a segue animation) to a different one. How can I approach this? I would guess that this isn't hard to achieve, but I am lost. Any help would be appreciated!

Let me know if I need to submit any code - I do have the basic classes written but nothing relating to this.

Thanks, -Aidan

  • After doing a bit more research it seems that I may have been wrong to write different view controllers for each view that the window can display. I'm used to Java where there's a single JFrame and then JPanels that can be set to visible when necessary under the frame. Maybe with the cocoa library I only need one view controller to manage a window's views? – user3730925 Dec 03 '14 at 00:28
  • 1
    I realize this is much too late, but for any who stumble onto this question: https://www.youtube.com/watch?v=ScB9ZJbkCJI&index=35&list=PLE83F832121568D36 –  Jun 29 '16 at 00:25

0 Answers0