Post

Replies

Boosts

Views

Activity

Comment on SwiftUI #Preview with Callback Closure
Thanks.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Nov ’23
Comment on How to Detect the Retina Display for macOS in SwiftUI
The pixelLength guy also returns 1.0 on my iMac. Disappointingly, many graphic things are not working under SwiftUI.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’23
Comment on How to Detect the Retina Display for macOS in SwiftUI
I get the same result under Xcode 14 and Xcode 15.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’23
Comment on How to Detect the Retina Display for macOS in SwiftUI
Okay. I've tested the code with my Retina 5K (5,120 x 2,880) iMac (6-Core Intel Core i5, 3 GHz, Built-In Retina LCD). It has returned 1.0.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’23
Comment on How to Detect the Retina Display for macOS in SwiftUI
Thanks. I don't remember exactly when I posted this topic. My Mac mini with a non-Retina display arrived exactly one month ago on September 28th, 2023. I strongly doubt that I ran the code on my Mac mini. And I'm quite certain that the code has returned 1.0.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’23
Comment on List with ForEach Enumeration
That is it. Thanks a lot.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’23
Comment on 'unarchiveTopLevelObjectWithData' was deprecated Use unarchivedObject(ofClass:from:) instead
Hmm... I haven't thought about using Codable. I'll try it tomorrow for the same task.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’23
Comment on 'unarchiveTopLevelObjectWithData' was deprecated Use unarchivedObject(ofClass:from:) instead
Okay. I confirm that your example works such that I can save data to a file and then read data from that file. That should give me some idea. Thank you.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’23
Comment on 'unarchiveTopLevelObjectWithData' was deprecated Use unarchivedObject(ofClass:from:) instead
I'll test your example as it is, then.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’23
Comment on 'unarchiveTopLevelObjectWithData' was deprecated Use unarchivedObject(ofClass:from:) instead
Hmm... Unfortunately, the do-catch error for NSKeyedUnarchiver says "The data couldn’t be read because it isn’t in the correct format." 😢
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’23
Comment on 'unarchiveTopLevelObjectWithData' was deprecated Use unarchivedObject(ofClass:from:) instead
Also, if I set the requiringSecureCoding value to true, the do-catch error for NSKeyedArchiver says "The data couldn’t be written because it isn’t in the correct format'
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’23
Comment on 'unarchiveTopLevelObjectWithData' was deprecated Use unarchivedObject(ofClass:from:) instead
Thank you, eskimo. That's very kind of you. I'll take a good.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’23
Comment on SwiftUI on macOS, app generating a png file on the desktop from a screenshot made to the pasteboard
You are not allowed to save a file to a path that you specify without user's consent if your desktop application is sandboxed unless it's directed at the sandbox folder your application is assigned to. I'm sorry to say, but that's macOS software development 101. I have seen a similar question several days ago at Stack Overflow.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’23
Comment on DisclosureGroup with Swipe Actions and Contextual Menu
Yes, that's exactly what I need. That's excellent! Thanks a lot.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’23
Comment on DisclosureGroup with Swipe Actions and Contextual Menu
Thanks. I'll take a look.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’23