aboutsummaryrefslogtreecommitdiff
path: root/foray/ForayTableViewController.swift (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-03-24Reorganise into folder groupsNicholas Tay1-107/+0
In preparation for presenters to come in largely, lots of files starting to go everywhere...
2022-03-22Adjust YearSection to just IntNicholas Tay1-11/+5
Was a bit awkward to have it as a Date normalised to first day of the year
2022-03-21Loading overlay to custom class + add to coordinatorNicholas Tay1-10/+2
Just an idea I had, since it was quite messy that a TableViewController was handling all that. Instead now it should be reusable through the ForayCoordinator itself, which means e.g. on details screen, we can show the loading overlay.
2022-03-21First try at implementing coordinator patternNicholas Tay1-6/+4
Resources: - https://www.hackingwithswift.com/articles/71/how-to-use-the-coordinator-pattern-in-ios-apps
2022-03-20Split structs into other file, split networking outNicholas Tay1-66/+17
It isn't much so far, as it is just effectively the API retrieval function extracted from the TableViewController. But this should also allow other VCs to get from API too if required :^)
2022-03-19Add back in RefreshControlNicholas Tay1-1/+1
Missed in when ripping out storyboard
2022-03-19Fix selected item not being passed throughNicholas Tay1-1/+1
2022-03-19Storyboard is GONENicholas Tay1-0/+1
Note - I had to fo into the Target settings -> Info -> Custom iOS Target Properties -> adjust the Application Scene Manifest there. Resources: - https://ioscoachfrank.com/remove-main-storyboard.html - https://stackoverflow.com/questions/25167458/changing-navigation-title-programmatically
2022-03-19Remove segue, push directly into nav controllerNicholas Tay1-14/+7
2022-03-18Add back in segue to details viewNicholas Tay1-5/+13
This took a bit to figure out due to the identifier stuff, but we got there. I'd like to figure out how to push a VC into the navigation controller though, rather than relying on storyboard segues.
2022-03-18Cleanup old prototype cellsNicholas Tay1-23/+3
2022-03-18Add back in description label and image to custom cellNicholas Tay1-13/+13
I don't think this 100% is the correct way with SnapKit. Need to seek advice and improve the constraints. However, an improvement over before is that the accessibility font sizes actually do work as intended now! Now to add back in the segues somehow...
2022-03-18Split table view cell into separate fileNicholas Tay1-10/+17
Cell no longer uses prototypes as registered in the Storyboard. Instead is a custom class inheriting the UITableViewCell and is manually registered by the VC. This is a first step towards reimplementing the prototype cells. Only has one label at the moment.
2022-03-16Use public URL for dummy API JSONNicholas Tay1-3/+5
Remembered I actually had a public server for me to dump files on lol
2022-03-16Sort items by date first as well for within-section sortNicholas Tay1-0/+1
2022-03-16MyItem -> PenguinItemNicholas Tay1-13/+13
Makes it clear which parts are tightly coupled. I want to learn how to make this more generic so I can try hooking into other APIs easily (which make require different destructuring of JSON).
2022-03-16Add refresh control + fix weird cachingNicholas Tay1-2/+16
It might be my web server causing the weird caching with headers (it's just a json file on nginx). Changing the policy in the request seems to have fixed it though. Refresh control references: - https://stackoverflow.com/questions/24475792/how-to-use-pull-to-refresh-in-swift
2022-03-16Loading overlay on main screenNicholas Tay1-0/+11
I'm not 100% sure if this is the best way to do it, but it looks decent and it works. Resources: - https://stackoverflow.com/questions/27960556/loading-an-overlay-when-running-long-tasks-in-ios
2022-03-16Add a detail viewNicholas Tay1-0/+10
Resources: - https://guides.codepath.com/ios/Using-UITableView (was a bit dated)
2022-03-15Make items Decodable and hook up to a JSON dummy endpointNicholas Tay1-21/+53
Resources: - https://stackoverflow.com/questions/56443859/display-in-json-api-table-view-in-swift - https://www.avanderlee.com/swift/json-parsing-decoding/ - https://stackoverflow.com/questions/24321165/make-rest-api-call-in-swift
2022-03-14Second type of custom cellNicholas Tay1-9/+24
Not sure if this is the correct way of switching into a different cell type with the prototypes, but it works. To review.
2022-03-14Grouping items together by yearNicholas Tay1-10/+49
https://www.ralfebert.com/ios-examples/uikit/uitableviewcontroller/grouping-sections/
2022-03-14Learning UITableViewController: array data + custom cellsNicholas Tay1-0/+59
Forgot to commit after finishing just the using array data bit. So committing with the custom cells done. https://www.ralfebert.com/ios-examples/uikit/uitableviewcontroller/