Post

Replies

Boosts

Views

Activity

Reply to UIContextMenuConfiguration causes retain cycle
Thanks for showing your code and I could not reproduce the issue you described. Whether I include your code into a sample code of CollectionView, memory consumption does not show significant difference. One thing. I see deinit happens in popped ViewController but not with its CollectionView Cell. One possibility, your CollectionView Cell is causing the issue. Can you create a brand-new project, which is minimized just to reproduce the issue, and show full code of it? Steps needed to reproduce the issue would also be welcome.
Topic: UI Frameworks SubTopic: UIKit Tags:
Mar ’21
Reply to Schedule start of notification requests
I'm a little confused as to what you mean by calling that function. Where would I call that function? And what is the requestItentifier in that function? Seems you do not know how to respond to user notifications. Please show your code instantiating your LocalNotificationManager.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’21
Reply to Closure definition mismatch
 I am going to rollback all of the changes and continue develop on Swift 5. Seems to be a reasonable decision. If you have some difficulties using the binary framework with Swift 5, you can utilize the forums, but it might be better for you to contact to the author of the framework.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to Type of expression is ambiguous without more context - Error Swift
Please make a better formatting to your code, start with ``` only line and end with ``` only line. You declare the type of your first property id as ObjectIdentifier (which is rarely used), but passing an instance of UUID to it. Try changing the definition of DoseModel as follows: struct DoseModel: Identifiable { var id: UUID //- var date: String var medicine: String var units: Double //- You use `doubleValue` for `value` var value: String } By the way, what is JSON? I guess you are using an old third party framework which once was popular in ancient Swift developers. But currently, it is considered to be a ruins of old era. You should better move to Codable.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’21
Reply to Loop over two arrays with different length
When will the loop finish? When arrayOfItems is finished? Or a longer Array finished? Or else you want an infinite loop? In case When arrayOfItems is finished: for i in arrayOfItems.indices { let elt1 = arrayOfItems[i] let elt2 = arrayOfFive[i % arrayOfFive.count] print(elt1) print(elt2) print() } (Assuming arrayOfFive is not empty.)
Topic: Programming Languages SubTopic: Swift Tags:
Feb ’21
Reply to Schedule start of notification requests
You may register a notification with specifying the start date, no repeating. You can re-register the everyday notification when processing the date specified notification. Or you can register a next notification at each time you received a date specific notification.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’21