moving from view controller to another view controller without using segue

Discussion in 'iOS Programming' started by shahab47, Apr 16, 2012.

  1. shahab47 macrumors newbie

    Joined:
    Apr 8, 2012
    #1
    Hello there

    I have two view controllers vc1 and vc2.

    I can go from vc1 to vc2 using segue (modal)
    And I can come back from vc2 to vc1 by just dismissing the vc2. (so that it doesn't need any segue to go back from vc2 to vc1).

    I would like to know how to go from vc1 to vc2 without using any segue. This vc1 is the main window which opens when app loads. Once it loads, I want to click a button which should take me to vc2.

    I know its very simple but after trying so much, I am still nowhere.

    If you can include a simple code, that would be greatly appreciated.
     
  2. cMacSW macrumors regular

    Joined:
    Mar 20, 2006
    #2
    Use UINavigationController method pushViewController
     
  3. shahab47 thread starter macrumors newbie

    Joined:
    Apr 8, 2012
    #3
    correct me if I am wrong, but push method works with UINavigation object. and I am working with view controller.

    I don't want to fuse UINavigation. There should be some way to do this using view controller.

    Any help would be great.
     

Share This Page