• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: "Computed segue" in iOS?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "Computed segue" in iOS?


  • Subject: Re: "Computed segue" in iOS?
  • From: Mike Abdullah <email@hidden>
  • Date: Sun, 06 Sep 2015 18:27:48 +0100

Ideally, you use different cells for the different data elements, and wire them up to the appropriate segue, letting the system take care of most of it for you.

If you need something more complex, it’s time to trigger the segues programatically. You can wire up multiple segues from your source View Controller to other VCs.

Probably simples from there is to implement the UITableViewDelegate method which tells you a cell was selected and trigger the segue from it. But an alternative can be to wire up a single segue from the cell itself, and override -shouldPerformSegueWithIdentifier: to return NO and trigger a different segue instead.

> On 5 Sep 2015, at 01:03, Carl Hoefs <email@hidden> wrote:
>
> iOS 8.4.1
>
> I need to segue from a UITableView to different view controllers depending which element in the table is touched (some elements are videos that need to be displayed/edited, some are data files that need to be graphed, etc.).
>
> Is it possible to have a "computed segue" in iOS such that I can segue intelligently to the appropriate view controller based on some criteria? Or must I use a "stopgap" view controller invoked by the UITableView that will do the content analysis and then perform a segue to the appropriate view controller?
>
> -Carl
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: "Computed segue" in iOS?
      • From: Carl Hoefs <email@hidden>
References: 
 >"Computed segue" in iOS? (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Re: Swift generics, circular type declarations, and segfaults, oh my!
  • Next by Date: Re: Getting started with Cocoa Bindings in My Project?
  • Previous by thread: "Computed segue" in iOS?
  • Next by thread: Re: "Computed segue" in iOS?
  • Index(es):
    • Date
    • Thread