# Delegate vs Segue

**URL:** <https://forums.kodeco.com/t/delegate-vs-segue/19423>\
**Category:** iOS\
**Created:** [September 6, 2016, 7:18pm UTC](https://forums.kodeco.com/t/delegate-vs-segue/19423 "2016-09-06T19:18:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpawel](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/mpawel/32/41357_2.png) [@mpawel](https://forums.kodeco.com/u/mpawel)\
**Post date:** [September 6, 2016, 7:18pm UTC](https://forums.kodeco.com/t/delegate-vs-segue/19423/1 "2016-09-06T19:18:13Z")

</div>

I’ve finished through the first 2 apprentice iOS tutorials, and I must admit they are smashing.

I have run into a bit of a question that I’m looking to get some help with regarding which is preferred to use, a delegate vs passing information to another ViewController.

Within the tutorial it gets done both ways, and I understand the idea behind the delegates (do the thing and I don’t care how), I’m just curious if there is a scenario if one is preferred over the other.

Best,

---

<div class="post-metadata">

**Author:** ![marciokoko](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/marciokoko/32/32922_2.png) [@marciokoko](https://forums.kodeco.com/u/marciokoko)\
**Post date:** [September 6, 2016, 8:37pm UTC](https://forums.kodeco.com/t/delegate-vs-segue/19423/2 "2016-09-06T20:37:50Z")

</div>

Well delegates are used when you may want to expose the protocol functionality to other view controllers later on.

Its a bit more elegant and clean some might say.

---

<div class="post-metadata">

**Author:** ![mpawel](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/mpawel/32/41357_2.png) [@mpawel](https://forums.kodeco.com/u/mpawel)\
**Post date:** [September 8, 2016, 2:43pm UTC](https://forums.kodeco.com/t/delegate-vs-segue/19423/3 "2016-09-08T14:43:28Z")

</div>

So unless you’re wanting extra functionality on the data, passing the information via a prepareforsegue function might be a leaner solution?

---

<div class="post-metadata">

**Author:** ![marciokoko](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/marciokoko/32/32922_2.png) [@marciokoko](https://forums.kodeco.com/u/marciokoko)\
**Post date:** [September 8, 2016, 4:22pm UTC](https://forums.kodeco.com/t/delegate-vs-segue/19423/4 "2016-09-08T16:22:31Z")

</div>

Yeah, definitely. You are simply setting a ‘variable’ (property) on another object, ie the destinationViewController.
