Post

Replies

Boosts

Views

Activity

Reply to @AppStorage with Date in SwiftUI
extension Date: RawRepresentable { public var rawValue: String { self.timeIntervalSinceReferenceDate.description } public init?(rawValue: String) { self = Date(timeIntervalSinceReferenceDate: Double(rawValue) ?? 0.0) } } This one works Thank you!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’21
Reply to Index out of range, SwiftUI
The problem is not the onTapGesture (the onTapGesture is also a placeholder), the problem is that valori has fewer elements than valoriAsseX, I want that if valori[I] doesn't exist it becomes 0. Don't look at the onTapGesture, it's not a problem
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’21
Reply to @AppStorage with Date in SwiftUI
extension Date: RawRepresentable { public var rawValue: String { self.timeIntervalSinceReferenceDate.description } public init?(rawValue: String) { self = Date(timeIntervalSinceReferenceDate: Double(rawValue) ?? 0.0) } } This one works Thank you!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to PersistenceController and CloudKit
Your code makes CloudKit work but stops the widget extension from connecting to the CoreData Database. Thank you for your time.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to CloudKit and CoreData synchronization
I don't think it's working. It still syncs the data across devices just if I close and reopen the app. I had also tried using a timer, to call the readData function every second, but it creates several bugs in the app.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’21
Reply to Index out of range, SwiftUI
The problem is not the onTapGesture (the onTapGesture is also a placeholder), the problem is that valori has fewer elements than valoriAsseX, I want that if valori[I] doesn't exist it becomes 0. Don't look at the onTapGesture, it's not a problem
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’21
Reply to Index out of range, SwiftUI
The ** values ** array is just a placeholder for now, it can be empty or have N elements, I just want to assign 0 to values[i] when it doesn't exists, but when I try it it crashes anyway
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’21