iOS UI: Working with sub-views in Swift

Discussion in 'iOS Programming' started by Laird Knox, Jul 17, 2015.

  1. Laird Knox macrumors 68000

    Joined:
    Jun 18, 2010
    #1
    I expect this is a simple question but it just isn't clicking for me. If anybody can point me in the right direction or towards a tutorial it would be appreciated.

    I am trying to create an app that has some buttons on the left side and a region on the right side. Clicking on the buttons will change the view in the region.

    Untitled-1.png
    So button one would show the tan view, button 2 the green view and button three the blue. I can embed the view in the region and it shows up just fine. If I wire the buttons to the views then they are displayed over the entire application view rather than in the sub-view.

    I'm sure this isn't that difficult but I'm just not getting it. I've tried various views and controllers and not had any luck. My Google-Fu has been failing and I can't find any relevant tutorials. Can somebody help me sort this out?

    Thanks!
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2

Share This Page