aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ForayNewTableViewCell -> ForayTableViewCellNicholas Tay2022-03-253-7/+7
|
* Reorganise: NetworkManager -> Fetcher, Models -> dedicated groupsNicholas Tay2022-03-255-27/+43
|
* getData -> fetch, try threading, move logic aroundNicholas Tay2022-03-253-23/+28
|
* Move Details ViewModel -> string/image into VCNicholas Tay2022-03-252-16/+16
|
* First attempt at PresenterNicholas Tay2022-03-247-55/+108
| | | | | This is admittedly pretty hard for me to wrap my head around, and I'm not even using background threading explicitly yet. Will improve.
* Reorganise into folder groupsNicholas Tay2022-03-249-7/+31
| | | | | In preparation for presenters to come in largely, lots of files starting to go everywhere...
* Update LEARNING goalsNicholas Tay2022-03-241-2/+14
|
* Split details view into separate View and VCNicholas Tay2022-03-244-72/+133
| | | | | Also fixed the scrollview margins while I was at it - it looked weird being so inside
* Adjust YearSection to just IntNicholas Tay2022-03-222-12/+6
| | | | | Was a bit awkward to have it as a Date normalised to first day of the year
* Loading overlay to custom class + add to coordinatorNicholas Tay2022-03-214-10/+53
| | | | | | | 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.
* Fix scroll in details viewNicholas Tay2022-03-212-2/+4
| | | | | | Didn't constrain details label to the bottom of the content container, so scroll view didn't pick up on it (test with large font on a smaller viewport phone).
* Switch to launch with SceneDelegateNicholas Tay2022-03-213-13/+34
| | | | | | | | | | | | | | Pretty sure I'm meant to launch via SceneDelegate now, was confused by that probably due to older tutorials. Read a bit about it and it seems like it's due to multi-instance/screen support, so switched back to doing it this 'new way'. Was a bit confused but I think I deleted too much from Info.plist and got rid of the 'Default Configuration' which launches the SceneDelegate. I think we're good now though, had to reference a new template project. References: - https://sarunw.com/posts/how-to-create-new-xcode-project-without-storyboard/
* First try at implementing coordinator patternNicholas Tay2022-03-216-31/+98
| | | | | Resources: - https://www.hackingwithswift.com/articles/71/how-to-use-the-coordinator-pattern-in-ios-apps
* Add ScrollView to details screenNicholas Tay2022-03-201-4/+14
| | | | | | Would make more sense as more lines get added in (especially if ui elements programatically), as well as since horizontal layout is allowed if the screen is small you can scroll
* Allow >=iOS 13.0Nicholas Tay2022-03-201-0/+2
|
* Split structs into other file, split networking outNicholas Tay2022-03-204-66/+100
| | | | | | 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 :^)
* Update learning goalsNicholas Tay2022-03-191-2/+3
|
* Add back in RefreshControlNicholas Tay2022-03-191-1/+1
| | | | Missed in when ripping out storyboard
* Merge ForayNewDetailView into the VC itselfNicholas Tay2022-03-193-95/+71
| | | | | | | | Not sure if this is the right move, but it felt extraneous to have a whole UIView to itself for now. Instead just have it right inside the VC. Probably a step in the wrong direction though, but will need to review.
* Fix selected item not being passed throughNicholas Tay2022-03-192-4/+5
|
* Adjust offsets and fix details label linesNicholas Tay2022-03-192-4/+5
|
* Storyboard is GONENicholas Tay2022-03-197-132/+17
| | | | | | | | | 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
* Remove segue, push directly into nav controllerNicholas Tay2022-03-192-37/+7
|
* Detail view is now programatically createdNicholas Tay2022-03-195-70/+99
| | | | | Using SnapKit and some experimentation around the VC. Next step is to change segue and then maybe get rid of storyboard all together.
* Add back in segue to details viewNicholas Tay2022-03-182-8/+29
| | | | | | 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.
* Cleanup old prototype cellsNicholas Tay2022-03-182-133/+6
|
* Use margins for new cell container + better image insetNicholas Tay2022-03-181-12/+13
| | | | | Surely there still is a better way for the trailing constraints on the labels?
* Add back in description label and image to custom cellNicholas Tay2022-03-182-19/+62
| | | | | | | | 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...
* Split table view cell into separate fileNicholas Tay2022-03-183-10/+60
| | | | | | | | | 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.
* Added SnapKit with Swift package managerNicholas Tay2022-03-183-2/+44
| | | | | | | | | | | | | | | | Was thinking of using CocoaPods as that's what is in use, but either way looked decently straightforward. Decided to start with whatever was already built in and no extra software. Note: it was File > Add Packages > put git link in top right. References I saw seemed to say File > Swift Packages and I couldn't find it. Also some other docs had older screenshots, I presume it's pre-Xcode-13 being slightly different. References: - https://developer.apple.com/documentation/swift_packages/adding_package_dependencies_to_your_app - https://www.raywenderlich.com/7242045-swift-package-manager-for-ios - https://snapkit.io/docs/
* Add other repo meta filesNicholas Tay2022-03-172-0/+27
|
* Add in LEARNING.md to track learning progress and tasksNicholas Tay2022-03-171-0/+18
|
* Add gitignore, remove new ignoresNicholas Tay2022-03-162-14/+93
| | | | Luckily it was only one file
* Use public URL for dummy API JSONNicholas Tay2022-03-161-3/+5
| | | | Remembered I actually had a public server for me to dump files on lol
* Sort items by date first as well for within-section sortNicholas Tay2022-03-161-0/+1
|
* MyItem -> PenguinItemNicholas Tay2022-03-162-14/+14
| | | | | | 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).
* Add refresh control + fix weird cachingNicholas Tay2022-03-162-2/+19
| | | | | | | | | 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
* Modify details to multiline with release date includedNicholas Tay2022-03-162-5/+12
|
* Loading overlay on main screenNicholas Tay2022-03-161-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
* Add a detail viewNicholas Tay2022-03-164-2/+129
| | | | | Resources: - https://guides.codepath.com/ios/Using-UITableView (was a bit dated)
* Make items Decodable and hook up to a JSON dummy endpointNicholas Tay2022-03-151-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
* Second type of custom cellNicholas Tay2022-03-142-10/+85
| | | | Not sure if this is the correct way of switching into a different cell type with the prototypes, but it works. To review.
* Grouping items together by yearNicholas Tay2022-03-141-10/+49
| | | | https://www.ralfebert.com/ios-examples/uikit/uitableviewcontroller/grouping-sections/
* Learning UITableViewController: array data + custom cellsNicholas Tay2022-03-1430-36/+250
| | | | | | 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/
* Initial CommitNicholas Tay2022-03-1413-0/+690