blob: a01f53ccea9638cff34bb361a5b5fb27c3e4793c (
plain) (
tree)
|
|
# 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
- [ ] 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
- [ ] 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
|