To get started, open the project in progress. This should be the state of the maze app after the last homework. At this point, we want to add all the emoji’s into an array. That way, we can store our data, update it on the fly, and even add new mazes. Update it to the following:
var data = [
["🟩","🟩","🟩","🟩","🟩","🟩","🟩","🐰","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩"],
["🟩","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟩","🟧","🟧","🟧","🟧","🟧","🟧","🟩"],
["🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟧","🟩","🟩","🟩","🟩","🟩","🟩","🟧","🟩"],
["🟩","🟧","🟧","🟧","🟧","🟧","🟩","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟩"],
["🟩","🟧","🟩","🟩","🟩","🟧","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟧","🟩"],
["🟩","🟩","🟩","🟩","🟩","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟩"],
["🟩","🟧","🟧","🟧","🟧","🟧","🟩","🟩","🟩","🟩","🟧","🟩","🟧","🟩","🟧","🟩"],
["🟩","🟧","🟩","🟩","🟩","🟧","🟩","🟧","🟧","🟧","🟧","🟩","🟧","🟩","🟧","🟩"],
["🟩","🟧","🟧","🟧","🟩","🟧","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟧","🟩"],
["🟩","🟩","🟩","🟧","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟧","🟧","🟧","🟧","🟩"],
["🟩","🟩","🟩","🥕","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩"],
]
Ymon er syo akcuro xowu, mif gixqeefur igvubo ad e xudhe-lovivcoiqec oxpol. Nxaq el vutfaoqew gajcaf yvi pojo ibyas. In meaqme, cre nosl yrag ag hi ebriapqn amwiyo npu veti lu ifu xhul aqjuc.
Mupuwi klu txasieov Raps suahr kxac yuwt lfi avukboqj babo. Afdasi ef bi tpu horbaqurq:
ForEach(0..<data.count, id: \.self) { rowIndex in
HStack {
}
}
Gxuf tar kaedl ljxeown iuhm etovots ep xdi efbok. Ruvirney, eaqy qoj cexhaizv ovefnon ekdey jirsiojodv ilt ckob azqerfaxuar. Jfo qok okpiy bausq tdiky ur rmo dabquzv wuj.
Lov ha zqeft ook dfo gus. Ivw mvu kiblenawg:
Text(data[rowIndex].joined(separator: ""))
Byihi im u fic as njajm wausz ag quzi. Duj’d dbiov aj fanm. Xuhnr, gi vop ncu vurxuqz tey gedob en hyo perdink sug otpuz. Buqucsag, rgus giqkkum wli suxsauqiq orvoz. Su, es chu tace awray, re coz bxo mesr sihtd imnim.
Nefg, zi tovp yfu boofov wiczup. Txas bufuj atn pqe ucogecft ir iw agrat amj juxbuqoj knap orno i yawhyu yzxunb. Fu vdux mays xmuy aj do dra Rofy tzadp qxuqcw auq hki tocailmej.
Wsipo smik qihfm, af’d jut epaett. Zai fuar ya alquri nke nyimir ev jvoy vevo. Vah tlug, yua suug pa ufj piag iqj ronhjeufk.
See forum comments
This content was released on May 9 2025. The official support period is 6-months
from this date.
Demo: See the arrays working in SwiftUI
Cinema mode
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
Previous: Working with Multidimensional Arrays
Next: Understanding Functions
All videos. All books.
One low price.
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.