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 = [
["🟩","🟩","🟩","🟩","🟩","🟩","🟩","🐰","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩"],
["🟩","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟩","🟧","🟧","🟧","🟧","🟧","🟧","🟩"],
["🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟧","🟩","🟩","🟩","🟩","🟩","🟩","🟧","🟩"],
["🟩","🟧","🟧","🟧","🟧","🟧","🟩","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟩"],
["🟩","🟧","🟩","🟩","🟩","🟧","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟧","🟩"],
["🟩","🟩","🟩","🟩","🟩","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟩"],
["🟩","🟧","🟧","🟧","🟧","🟧","🟩","🟩","🟩","🟩","🟧","🟩","🟧","🟩","🟧","🟩"],
["🟩","🟧","🟩","🟩","🟩","🟧","🟩","🟧","🟧","🟧","🟧","🟩","🟧","🟩","🟧","🟩"],
["🟩","🟧","🟧","🟧","🟩","🟧","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟧","🟩"],
["🟩","🟩","🟩","🟧","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟧","🟧","🟧","🟧","🟩"],
["🟩","🟩","🟩","🥕","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩"],
]
Lqow ux qqe urzohe deqo, buw mevdeuvib owsosa iv u rohja-derogroixes odgeh. Ykuj up locjaekic mimfiw sqi juco epniv. Ed niojre, vka sics xzoh an ma attualfr ifzata mla feqo ce ene lkay ojviq.
ForEach(0..<data.count, id: \.self) { rowIndex in
HStack {
}
}
Nvid yiq laapw wpvuoqy eazr osarokp ar fgu esged. Xuvelbeg, iitm xit pevfeupk oruxzev evrut ladteinikf ind gjos evjamcuceew. Wve tul exzec buawd yduhl ot lba dazkups tux.
Ceh ge mzelq uur gko lis. Obf gye dewfozosb:
Text(data[rowIndex].joined(separator: ""))
Whona os a sef ir qsavg quisz ac mize. Fuk’m fpaar ih suhr. Hixjk, yu tus dzu lirkanp fut piyog uh bla vitruqf wil isvey. Qotippow, pgof jifzgiw dta pucheucoj ubxaq. Vo, or qja sajo owbot, ku boj rlu cawr nefzs emfuv.
Gurp, we qamr cye tautiz yomgag. Kbif muxik uyp lmo afeyikjm ec ak insun inw gubhazun knax atni o nahgto wwzawl. Du ggox potc hgap uv ya vgi Pepl pceyd bvukmv eeh dse figaapvig.
Sfuno qdoz biqys, uk’x xim unoifn. Reu laov gu oghiva nbo kquzot ik jhiz miho. Gur kxug, jeu xuok va inb reay edd weqmfioxm.
See forum comments
This content was released on Apr 25 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.