Post

Replies

Boosts

Views

Activity

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:
Aug ’21
Reply to App increases size even if I delete data (Core Data)
You should probably have to recreate the database completely, just keeping existing records. If you can explain better your solution it would be better for me In any case, does this cause you problem or is this for understanding ? It does not create me a direct problem, however I want to find a solution, because if you think about it, if you add and delete data every day for 100 days, even if there is no data (in the app) there will be a lot of MB occupied by the app in the iPhone Storage. Thank You!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’21
Reply to Collapse button NavigationView SideBar SwiftUI
Does your actual code show the collapse button ? Yes Here is a very similar code struct ContentView: View { var body: some View { NavigationView{ List{ NavigationLink { Text("Hello") } label: { Text("Hello") } NavigationLink { Text("World") } label: { Text("World") } } .navigationTitle("Test") } } } What I want to really achieve is the sidebar that is used in the iPad Settings app, if you know how to do that, it would be perfect. Thank You very much
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’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
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 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 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 @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 App increases size even if I delete data (Core Data)
You should probably have to recreate the database completely, just keeping existing records. If you can explain better your solution it would be better for me In any case, does this cause you problem or is this for understanding ? It does not create me a direct problem, however I want to find a solution, because if you think about it, if you add and delete data every day for 100 days, even if there is no data (in the app) there will be a lot of MB occupied by the app in the iPhone Storage. Thank You!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Date in Swift printed is wrong
And what if I wanted to write if Date() > Date() + 86400 for example, is it formatted?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Date in Swift printed is wrong
let date = Calendar.current.dateComponents(in: .current, from: Date()).date! print(date)  Even if I do this it gives me the wrong date Why?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Rotate View around an other View SwiftUI
It works, Thank You OOPer!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Notify when @FetchRequest changes?
Is there another way? Because this .onRecevie(books.publisher) repeats too many times, I want it to execute one time?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Use onChange on FetchedResults/@FetchRequest variable or get notified when the variable changes
???
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Collapse button NavigationView SideBar SwiftUI
Does your actual code show the collapse button ? Yes Here is a very similar code struct ContentView: View { var body: some View { NavigationView{ List{ NavigationLink { Text("Hello") } label: { Text("Hello") } NavigationLink { Text("World") } label: { Text("World") } } .navigationTitle("Test") } } } What I want to really achieve is the sidebar that is used in the iPad Settings app, if you know how to do that, it would be perfect. Thank You very much
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Returning different dates from CoreData objects using NSPredicate
Why do you absolutely want to use predicate ? Because I Want to use it in @FetchRequest
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Returning different dates from CoreData objects using NSPredicate
Ok Thank You
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’21
Reply to Siri Shortcuts with CoreData
I just solved it, I forgot to add App Groups, however the app isn't refreshing, to see the new data I have to close it and reopen it, any clue on how to fix this issue, I will post my CoreData Stack
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21