A
A
Alexey Golovin2020-05-17 23:25:28
iOS
Alexey Golovin, 2020-05-17 23:25:28

What to choose TableView or CollectionView?

Friends, I chose a seemingly simple topic for my graduation project. I want to make a guide / build for rpg. That is, we have characters, as usual, classes, races, skills, weapons, and so on. But here about skills. Here is the structure I created.

enum SkillType {
    case ultimate, additionalUltimate, main, additionalMain, passive
}

struct Skills {
    let skillName: String
    let skillType: SkillType
    let skillDescription: String
    let additionalSkills: [Skills]
}


Now I need to display the skill tree on the screen. It would be logical to do this through tableView. The only way I found to do this is through section, but here comes the problem: the header of the section should be the main skill, and the main ult.
It should look something like this

Ulta
—-Additional ult 1
—Additional ult 2
—Additional ult 3
Main skill
—Additional main 1
—additional main 2
—-…
—Additional main N
Passives

Make it to hide and open specials when pressed on section I think it's not a problem. But I need to make sure that I can drag any skill to the skill panel of the Persian. You also need the ability to activate or deactivate a certain skill (darken for example), well, if it is not yet open.
In general, I'm completely confused. And here, in fact, a few questions:
1. Did I make the skill structure correctly? If I did it in SQL, it would be different, but I don’t know how to do it right here.
2. Did I do the right thing by choosing tableVIew or should I have done it in collectionView?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question