Sharing data between view controllers is part of the bread and butter of being an iOS developer, imagine an app with zero interaction between screens — boring right?

We are going to create a simple app that allows you to enter some text on the first screen and after pressing a button the text is displayed on the second screen.

Grab yourself a coffee, sit back and follow along, and I’ll show you just one way of achieving this using storyboard, segue, and a bit of Swift.

Start by opening a new project in Xcode, choose Single View App for iOS and tap next.

Choosing single view app in Xcode

#swift #downcast #xcode

Swift / Xcode: Sharing Data Between View Controllers.
1.20 GEEK