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

movingCurrentLineHour crashing on xcode 11.3.1 #37

Closed
justdan0227 opened this issue Jan 15, 2020 · 4 comments
Closed

movingCurrentLineHour crashing on xcode 11.3.1 #37

justdan0227 opened this issue Jan 15, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@justdan0227
Copy link

The following line is crashing on a minute update at guard let time =

private func movingCurrentLineHour() {
guard !(timer?.isValid ?? false) else { return }

    let date = Date()
    var comps = style.calendar.dateComponents([.era, .year, .month, .day, .hour, .minute], from: date)
    comps.minute = (comps.minute ?? 0) + 1
    guard let nextMinute = style.calendar.date(from: comps) else { return }
    
    timer = Timer(fire: nextMinute, interval: 60, repeats: true) { [unowned self] _ in
        let nextDate = Date()
        guard let time = self.getTimelineLabel(hour: nextDate.hour) else { return }
@kvyatkovskys kvyatkovskys added the bug Something isn't working label Jan 15, 2020
@kvyatkovskys
Copy link
Owner

🤔 Do you use the framework in UIKit or SwiftUI?

@justdan0227
Copy link
Author

justdan0227 commented Jan 16, 2020

Framework, no swiftUI, Swift 4.0 -
UPDATE: What is odd is that if I attempted to change the 60 to 5 as I was going to try and debug, it would ask if I wanted to unlock the file (since it’s a pod). I said yes and changed it to 5. Ran the app and it worked. Thought that's odd, so changed it back to 60. Now it works??

@kvyatkovskys
Copy link
Owner

🤔 I'll try to repeat and fix it on this weekend and update a framework. Thx for your report)

@kvyatkovskys
Copy link
Owner

Issue is fixed (v. 0.2.4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants