Skip to content

Make some UI changes#5

Open
LinnierGames wants to merge 5 commits into
weather-appfrom
erick-weather-app-uikit
Open

Make some UI changes#5
LinnierGames wants to merge 5 commits into
weather-appfrom
erick-weather-app-uikit

Conversation

@LinnierGames

@LinnierGames LinnierGames commented Aug 13, 2020

Copy link
Copy Markdown
Owner

What I changed or removed

  • UI is done in code (no storyboards or xib files). This includes the view controller and cells
  • Removed scene delegate (idk what it's for yet haha)
  • Use a UITableViewController instead of a UIViewController

What I added

  • UITableView register and dequeue methods
  • Moved business logic and testable code from the view controller to a view model

What I would have loved to change/add if I put more time

  • Used SwiftUI instead of UIKit
  • In a child branch, I converted DataStore, Location, and Networking into services using protocols

@LinnierGames LinnierGames added MVC Has Model View Controller design UI w/o Storyboard Built UI without using Interface Builder labels Aug 13, 2020
@LinnierGames LinnierGames added this to the Prj: Weather App milestone Aug 13, 2020
@LinnierGames LinnierGames added the Swift Readability Follows swift readability guide label Aug 13, 2020

class WeatherViewModel {
private(set) var validAddresses = [Address]()
private(set) var invalidAddresses = [Address]()

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woodward4422 2 days ago @woodward4422
Why are these two seperate arrays? Why do we need to store invalid adresses in a variable?

LinnierGames 1 hour ago Author Owner
IIUC, having two variables reads better than a 2-dimensional array named something like var addresses: [Address] where addresses[0] contains the list of valid addresses and addresses[1] contains the list of invalid addresses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MVC Has Model View Controller design Swift Readability Follows swift readability guide UI w/o Storyboard Built UI without using Interface Builder

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant