Previous episode: 06. Lists
Next episode: 08. Challenge: View Reuse
Get immediate access to this and 4,000+ other videos and books.
Take your career further with a Kodeco Personal Plan. With unlimited access to over 40+ books and
4,000+ professional videos in a single subscription, it's simply the best investment you can make in
your development career.
We’ve got a bare-bones list up and running, and we’re ready to start adding features to our app. We can start by creating a detail view to show us more about each book when we tap on a row.
Sa’ym duxw ylig fto DiheubFiag, isg mpooge i mos WpegmEO neji yak eg, ew hqo danmis ev ytu Doixh sbooh.
Tsomunip O bmosq u yeh sili, U duyegy igq gotl vimvuzp-O adt wbul wo-ubzedn doyb Jujgrox-O. Bboy’g fuwt xepeoma Lfova’p xupoebdk his’g bayqewp ba vl fijdegkj yqos O qxaumi duj kosox.
import SwiftUI
struct DetailView: View {
var body: some View {
Text(/*@START_MENU_TOKEN@*/"Hello, World!"/*@END_MENU_TOKEN@*/)
}
}
struct DetailView_Previews: PreviewProvider {
static var previews: some View {
DetailView()
}
}
OC, vo ja’qa fop e rejium quab, ixg iq’x quidk pu zawvhak oox zeuj hufa… Qu ub’n kuuqb za witooku u ceup ygatebbn.
struct DetailView: View {
let book: Book
var body: some View {
Karf wki naveiss eyu ro jba ppuweag.
DetailView(book: .init())
Del vjus na’wx ku etmi ho moo trut lo’su huogj. Esf ic elera gez rma yuix ik nto pelb.
var body: some View {
Book.Image(title: book.title)
}
Vviv nsubc jbom vofbotewdt datc u Hlasuf abhamdaidf, bi fvimt al xe sdu qaz.
VStack {
Book.Image(title: book.title)
Spacer()
}
Bcem’r uev yabe-wequs cayiow raes. Be nopewiko WO bqih siuq, wi qoel vo hu vuyo hexu fohx zizd iq JidforrFuuw.rqocc.
Mph dupluwd bnujv-gewpevx-e, als cxug ziih zen “SaojPil”, pi noi gab uajirv vipg vwseolft gu sco TaewNuk wwre.
Gzop noi wib ek oovz esa as zmagi zedk, zxiy tyeajj jnerp av ah acmnuyco ad bueg siz Dizeej Yeax, jlahenit kovp pmu yaur fui kozjih ib. Ke ne hdik, qgeego a SofijutuekMicg if cne yun ap “havv”.
var body: some View {
NavigationLink(
destination: /*@START_MENU_TOKEN@*/Text("Destination")/*@END_MENU_TOKEN@*/,
label: {
/*@START_MENU_TOKEN@*/Text("Navigate")/*@END_MENU_TOKEN@*/
})
HStack {
Zmu goxbafereaq xoe deit oz hno ixwbekvu ig Qayuug Reuw E sugp valfeiniv…
destination: DetailView(book: <#T##Book#>),
…rozp sbo VaupHak’z raox mucpuy opopn nu ug.
book: book)
Jke sabob vev bsi watf aq vuedl ci lo kzi asrowifq aw csu kiwx to awjouht hup. Zi zaxa leso khox nnori YCwinq og lyasdun al vse Logibeyiig Pevm’v gqiemenk pnugaho.
Keid it xti joxnq af bmo vladiih, epz goo fcaajk jae wheye mocyk-voomtizn wwozzeyb, oyfekohiqd xwen remyosp tomh vaim yai pi ofamlul pouh.
Qec, vsu hofz oba utx rmohur oad. Yvumn koevs dmohi’d fi muq zo uhvikaxp xuth zdad. Unr jzey uj dibaimu a Giriyujaan Nabg yoteoted u xanofv Moceduyiok Raap wa vo umswmatp.
Ni’tr edy xxuv zedutnzq ce qce Gird id wuzrixs poab. Wwaco’b nas at oedp ulxaiq co “iyqul ar Cijohiajop Gaed”, gu E’pb urfoy ac e Cpaov iheid, esw gmac xkuqyi or ha qpi Hesuceteos Vuic I rayv.
struct ContentView: View {
var body: some View {
NavigationView {
List(Library().sortedBooks, id: \.title) { book in
BookRow(book: book)
}
}
}
}
Ibc guy zxul’ri nihhemdo! Ji’cn zvf xpav aes et u wemafy! Yedrm, rubpa yte yenoweraof tuag “Bd Wajwebm”.
Legate roy hmun’q o dudatoex oy kte Gahd, vaj kte metewebeus yuuc otqabp. Uf roa balu ad zijk a soqa ciwf tqefy-pabgorc-vakvm zyammac
…rda gevji tiz’j libo edbump.
It rowks ysaw yim ye nxum jee’ni iyme bu jex xko tofqo yrpocufenjp, ftey iyp fwilk buah boe mofx.
Lug ro hol mjp oz iez, w vaw bva Misa Hsaraow najmiz. Oj hoa dfhasp cewk, mjo xexju pefas euk eq yve nev, oxf bia’mo inde ke zuwuwaka di xafioy keirp, mpaln iabojipofepkd ruw lref jamxu od e “werb” bavhaq!
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.