aboutsummaryrefslogtreecommitdiff
path: root/LEARNING.md
blob: 2c04f6559eba21f02c708d558e8a57b128e1b84e (plain) (blame)
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
# Learning Tasks

- [x] Create a basic project with UITableView, following an example
- [x] Create a table view with 2 different cell types
- [x] Read in some API and use it to populate the table view
- [x] Split table cells to another file (instead of building it in storyboard)
  - Do this in tandem with SnapKit task below
  - Register table cells to the table view
  - Look into `tableView.register(FeedbackToggleCell.self, forCellReuseIdentifier: FeedbackToggleCell.reuseIdentifier)`
- [x] SnapKit for cell layout stuff
  - Use a swift package manager to add it in
  - Check out FeedbackHeadingViewCell
  - Basically for constraints like `make.top.equalToSuperview().inset(8)`
  - Test this out with accessibility options to see how reflow - image and labels may fight with each other
- [x] Rip out Storyboard entirely
- [x] Extract network requests into own class
  - Make network class generic
  - See https://stackoverflow.com/questions/65576832/how-can-i-make-my-networking-class-generic-in-swift
  - TODO: Name it 'xxFetcher'
- [x] The 'coordinator pattern'
  - Don't worry about child coordinator
  - Decouple VCs from views
- [x] Custom views, separate View from VC
  - HasCustomView, see FeedbackVC
  - OK to have how I had it, taking in set data as string/images and not a ViewModel, since View could be reused in this way without coupling it to ViewModel, but either way works
- [x] Presenter
  - VC shouldn't see PenguinItem, only the one for rendering, e.g. 'PenguinItemModel'
  - ViewModel struct can be together with Presenter file if simple
- [ ] Background thread
  - DispatchQueue backgroundThread
  - Just one place on the presenter to fire back on Main