Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Landon/interview #1

Closed
wants to merge 18 commits into from
Closed

Landon/interview #1

wants to merge 18 commits into from

Conversation

landonr
Copy link
Owner

@landonr landonr commented Nov 4, 2023

UIKit Fightcamp app

about

Package.swift

FormattedPackageElement

  • takes in the package from the API and formats it for the screen

MainViewController

  • Shows the data in a collectionview
  • uses diffable datasource because im used to RxDataSources
  • holds MainViewModel

MainViewModel

  • holds the data for the UI
  • loads the data from a file
    • formats it for the UI after loading

PackageView

  • shows the Package in a styled cell
  • loads images from URLs in the formatted package
  • the thumbnail selection uses a published integer to keep track of the index
    • I thought about using a collectionview here, or keeping track of the index in the view model
      • we don't need to keep track of the tapped index when the cell is off screen so keeping track of the index didnt matter
      • a collection view inside of another collectionview cell seemed like a head ache
        • ideally this would be a more complicated collectionview flow layout with multiple cells instead of all in one cell

PackageCollectionViewCell

  • holds the package view.
    • I wasnt sure if I would do a tableview or collectionview starting out so I used a view in a stackview

ImageService

  • im used to using SDWebImage which works like a singleton I did this the same
  • it downloads the first time and saves the images for later

Helpers

  • a few extension methods that I needed to make it easier

@landonr landonr closed this Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant