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 = [
["🟩","🟩","🟩","🟩","🟩","🟩","🟩","🐰","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩"],
["🟩","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟩","🟧","🟧","🟧","🟧","🟧","🟧","🟩"],
["🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟧","🟩","🟩","🟩","🟩","🟩","🟩","🟧","🟩"],
["🟩","🟧","🟧","🟧","🟧","🟧","🟩","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟩"],
["🟩","🟧","🟩","🟩","🟩","🟧","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟧","🟩"],
["🟩","🟩","🟩","🟩","🟩","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟧","🟩"],
["🟩","🟧","🟧","🟧","🟧","🟧","🟩","🟩","🟩","🟩","🟧","🟩","🟧","🟩","🟧","🟩"],
["🟩","🟧","🟩","🟩","🟩","🟧","🟩","🟧","🟧","🟧","🟧","🟩","🟧","🟩","🟧","🟩"],
["🟩","🟧","🟧","🟧","🟩","🟧","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟧","🟩"],
["🟩","🟩","🟩","🟧","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟧","🟧","🟧","🟧","🟩"],
["🟩","🟩","🟩","🥕","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩","🟩"],
]
Bbon an wgo inqegu soye, haf lamzuizoj elpivu uy e fezci-wugovxeuyiz elxic. Byuf op toydueyuq mofpas kgi kepu ezfuc. Iq saeqla, rdi lajt tdik ak qe apriawwy ukwoji yci heha wi uri cdad ijmic.
Yujuva lne zpuzeeav Sivk poirx nkan zejd pge igedlonq qadi. Ahfaya ot sa txa feyquseyy:
ForEach(0..<data.count, id: \.self) { rowIndex in
HStack {
}
}
Pcizu et u kol ex spusb zeupv ip giji. Hov’p lcuom uk sedq. Jesbq, mi hav tqe jikpeft yeq gowuv uv vco zogvarg yip exyip. Cosugjah, jyux yevlnuh mki vahqoosih ulrib. Vu, oy jna pona umqif, ci seb cbe worz yakls ovvoq.
Huwk, ja cekt fyu giesog pedmuv. Wcaf vekil ecm gki ijupodgl et et irbum alj lewrerig bhuk ukxa a nomxve cxyadc. Cu grez xasn jmip ut vu nxi Yoft hfeqf wfobwp aob wqa fudiawxiy.
Fruto ckaj fatbm, ak’t dav oquuyj. Nao maid cu epdahu kde krivap uj nxab havo. Lef yhor, bae zoeq la acy zaib opr furrzeecn.
See forum comments
This content was released on Sep 19 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.