I want to create faq view controller. But i cannot find the best approach for creating models.
I want to show multiple solutions based on user's answers. For example
- Application Issues
- License Issue
- License is invalid
- Has this license ever been entered before in the app?
- If yes show these solutions
- ...
- Did this solution solve your problem?
- YES
- NO
- ...
- If no show these solutions
- ...
- If yes show these solutions
- ...
- Has this license ever been entered before in the app?
- License is invalid
- License Issue
I created models
struct FaqItem {
let name: String
let categories: [FaqCategory]
}
struct FaqCategory {
let name: String
let problems: [FaqProblem]
}
struct FaqProblem {
let name: String
let solutions: [FaqSolution]
}
struct FaqSolution {
let description: String
}
But i cannot figure out how to show solutions based on user's answers. What is the best approach to achieve this?
Thanks.