Beginning Swift 3 - Part 5: Tuples | Ray Wenderlich

Learn about tuples in Swift 3.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4095-beginning-swift-3/lessons/5

Hey, thanks for the awesome Swift tutorial! Is Swift# Intermediate coming soon? :slight_smile:

Yeup! We were stuck in a holding pattern while my glasses were being fixed. Right now, they are being edited. They should be released in a week or so.

import UIKit

let coordinate = (name: “Enemy location”, x: 10, y: 30 , z : 40)
coordinate.name

//let coordinate:(String,Int,Int,Int) = (name: “Enemy location”, x: 10, y: 30 , z : 40)
//coordinate.name

First two lines are working but second two lines are not working. I am under the impression that providing simply data type does not make any difference in accessing them and it should be same.