-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSupportDocsWithCategories.swift
More file actions
executable file
·38 lines (32 loc) · 1.17 KB
/
SupportDocsWithCategories.swift
File metadata and controls
executable file
·38 lines (32 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// SupportDocsWithCategories.swift
// SupportDocsExamplesUIKit
//
// Created by H. Kamran on 11/11/20.
//
import UIKit
import SwiftUI
import SupportDocs
class SupportDocsWithCategories: UIViewController {
/**
Connect this inside the storyboard.
This is just for demo purposes, so it's not connected yet.
*/
@IBAction func presentButtonPressed(_ sender: Any) {
let dataSource = URL(string: "https://raw.githubusercontent.com/aheze/SupportDocs/DataSource/_data/supportdocs_datasource.json")!
var options = SupportOptions()
let bobaCategory = SupportOptions.Category(
tags: ["boba"],
displayName: "Display Name Is Boba",
displayColor: UIColor.blue
)
let fastFoodCategory = SupportOptions.Category(
tags: ["fastFood"],
displayName: "These aren't really healthy",
displayColor: UIColor.red
)
options.categories = [bobaCategory, fastFoodCategory]
let supportDocsViewController = SupportDocsViewController(dataSource: dataSource, options: options)
self.present(supportDocsViewController, animated: true, completion: nil)
}
}