This is a companion discussion topic for the original entry at https://www.raywenderlich.com/10796666-table-views/lessons/11
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/10796666-table-views/lessons/11
Hi, at the end of this lesson i got errors in my Library.swift for each book that said:
Missing argument for parameter âreviewâ in call
Insert â, review: <#String?#>â
I resolved it by adding âreview:nilâ to the end of each library book instance. I am wondering why you didnât get that same error when building and running in the video?
Thanks
Hi! I suspect your review
property in Book
is a constant instead of a variable.
So, if you have this:
let review: String?
That means review
has to be set at initialization, since it canât be changed later on. To fix it up, just change that let
to var
var review: String?
Hi, Iâd like to know whatâs the best table view type (dynamic vs static) for informations that wonât change in a Medical education app. By example, Iâm creating a menu with different clinical signs and each clinical sign is linked to a specific table view. Thanks!
Hi! It sounds like a cool project!
My advice would be to consider how different you want each cell to be. If you want a table view full of cells that would use the same layout, and just link to different places, then Iâd go for dynamic. If you have different content and layout needs for each cell, then consider static.
How would you put a dictionary [String: [String]] in a list? I have a JSON file that looks like that, but I canât find a way to put the âethologyâ into a list⊠Need help haha!
{
ânameâ: âAcouphĂšnesâ,
âcategoryâ: âORLâ,
âdescriptionâ: "Bourdonnement, sifflement ou tintement entendu dans les oreilles ou dans la tĂȘte ",
âidâ: 63,
âisFeaturedâ: false,
âisFavoriteâ: false,
âDrapeaux rougesâ: [
âPulsatileâ,
âSurditĂ© unilatĂ©rale progressive (neurinome acoustique)â,
âCĂ©phalĂ©e (migraine ou LOE)â,
âSymptĂŽmes neurologiques focaux (LOE)â,
âCrises dâĂ©pilepsie (LOE)â,
âAtteitnes des NCâ,
âSymptĂŽmes B (nĂ©oplasie)â
],
âetiologiesâ: {
âVASCULAIREâ: [
âMalformations artĂ©rioveineusesâ,
âAnĂ©vrysme vasculaireâ,
âStĂ©nose carotidienneâ,
âDissection carotidienneâ,
âMurmure veineuxâ,
âSouffle cardiaqueâ,
âShunt auriculo-ventriculaireâ,
âHyperthyroĂŻdieâ,
âGrossesseâ,
âAnĂ©mieâ],
âNEUROLOGIQUEâ: [
âSclĂ©rose en plaquesâ,
âNeurosyphillisâ,
âMĂ©ningiomeâ,
âMigraineâ,
âHypertension intracrĂąnienne bĂ©nigneâ],
âNEUROSENSORIELâ: [
âPresbyacousieâ,
âOtosclĂ©roseâ,
âOtite moyenne aiguĂ«â,
âBarotraumaâ,
âTraumatisme sonoreâ,
âMĂ©dicaments ototoxiques (salicylates)â,
âMaladie de MĂ©niĂšreâ,
âAttteinte du nerf cochlĂ©aireâ,
âMalformation de Budd-Chiariâ,
âSchwannome vestibulaireâ,
âORLâ,
âDysfonction tubaireâ,
âLabyrinthite viraleâ,
âCholestĂ©atomeâ,
âSpasmes du muscle tenseur du tympan (NC V)â,
âSpasme du muscle stapĂ©dien (NC VII)â,
âMyoclonies palatinesâ,
âBouchon de cĂ©rumenâ,
âNeuronome acoustiqueâ],
âAUTRESâ: [
âDĂ©pressionâ,
âAnxiĂ©tĂ©â,
âPost-traumatiqueâ,
âArthrose cervicaleâ]
}
Hey! I recommend checking out Part 2 of the Saving Data in iOS course: https://www.raywenderlich.com/5429634-saving-data-in-ios
Itâs all about working with JSON :]