Game Action To Trigger Segue

Discussion in 'iOS Programming' started by TrentS, Jul 22, 2014.

  1. TrentS macrumors 6502


    Sep 24, 2011
    Overland Park, Kansas
    I'm getting close to completing my xcode game, but I was wondering if there is a way to have "in game play" trigger a segue from one view controller to another?

    The scenario is this...

    if (CGRectIntersectsRect(Object1.frame, Object2.frame)) {

    // code to segue from view controller 1 to view controller 2 //


    I'm sure this is a sophomoric stupid question, but I have yet to come across any info or tutorial on how to make this happen. All I have been able to find is "a button segue method", which is not what I want. Thanks in advance.

    :confused: :confused: :confused: :confused:
  2. JohnsonK macrumors regular

    Mar 6, 2014
    uhh, that would be weird to have a game performing a segue in the middle of gameplay but.....

    look into performSegueWithIdentifier:sender:

Share This Page