anjalakaturi / ATLAS-iOS-Fall-22

Repo for Mobile Application Development Fall 2022
0 stars 0 forks source link

App Progress #1

Open anjalakaturi opened 2 years ago

anjalakaturi commented 2 years ago

Project Check-In

Currently

Screenshot of ContentView:

Screen Shot 2022-10-11 at 10 31 30 PM

Next Steps:

Planned Feature List: https://github.com/anjalakaturi/plant/blob/main/planning/feature_list.txt

Learning:

Is anything particularly exciting to you about what you’ve accomplished so far?

Do you have any specific questions about how to proceed?

What have been the most challenging aspects so far?

zef commented 2 years ago

Great job so far Anjala! You're doing a great job figuring things out for yourself and putting things together!

Here's a little snippet on something you could do with the Calendar API to calculate time intervals instead of what you're doing now:

let now = Date()
if let targetDate = Calendar.current.date(byAdding: .day, value: 6, to: now) {
    let secondsToTarget = now.distance(to: targetDate)
}

Another little note from something I saw in your code:

    var isReadyToWater: Bool {
        if (daysBeforeWatering == 0){
            return true
        }
        else{
            return false
        }
    }

    // Would be the same as:
    var isReadyToWater: Bool {
        return daysBeforeWatering == 0
    }

There's no need for an if/else when you are returning true/false from it! :)