Post

Replies

Boosts

Views

Activity

Reply to How can I refactor a GeometryReader?
Value types in swift cannot be subclassed because they are not objects nor are they class types. You can try extending with the use of extensions but the internal behaviours of the components are private APIs except for what is already available as public APIs.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’22
Reply to Xcode 13.2.1 Preview
Notes The command below also works with 13.x.x https://developer.apple.com/documentation/xcode-release-notes/xcode-13_3-release-notes Xcode SwiftUI Previews may occasionally fail with an error message about a modified .hfile, such as “file Header.h has been modified since the module file Module.pcm was built: mtime changed.” (85938686) Workaround: Delete the Clang module cache by running the following command in Terminal: rm -rf "$TMPDIR/../C/clang/ModuleCache". Then try to preview the file again.
Feb ’22
Reply to Displaying Photos with PhotoKit inside LazyVGrid uses a lot of memory
Have you thought of processing thumbnails from Photohkit instead of making thumbnails from the original image size without actually resizing the original image source data? https://developer.apple.com/documentation/photokit/loading_and_caching_assets_and_thumbnails
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to Accessing sensors in background while app is closed
Not possible. Everything goes to sleep after a certain time unless it is an Apple system service which runs on a different set of rules, GPS region monitoring related, VOIP related, background audio etc.
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to How to generate .symbols files without exporting the archive?
Probably take a look in the derived folder of the latest build against a real device or just archive and export to disk.
Replies
Boosts
Views
Activity
Feb ’22
Reply to SwiftUI using .tag in picker doesn’t work on ForEach generated items
Tags must be unique, the first index of each item's separated component will produce a warning/error at runtime if it's not unique: Text($0).tag($0.components(separatedBy: " ")[0])
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to How to protect content for screenshot like Netflix on Safari does.
Seek and you will find.
Topic: Media Technologies SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to my segue transition goes upward instead of sideways and does not completely cover screen
Are there any performSeque implementations in MainViewController?
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to Any news from Apple on the random disk ejection fault?
This is not the place for the such questions: please go here: https://discussions.apple.com/welcome
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to why app crashes when I use localization and LocationButton in swiftui? I get this error:Thread 1: "Invalid parameter not satisfying: width && height"
Sounds like you're passing .infinity to a width and height parameter of a frame. it might be best to use a GeometryReady to get a width & height as the minWidth & minHeight and use .infinity as the maxWidth & maxHeight or just use an absolute w x h.
Replies
Boosts
Views
Activity
Feb ’22
Reply to C++ include path completion for header using .hpp as a suffix
Yes, once you include them. Wrap the c++ methods into objective-c calls. then annotate the objective-c calls for use in swift.
Replies
Boosts
Views
Activity
Feb ’22
Reply to How can I refactor a GeometryReader?
Value types in swift cannot be subclassed because they are not objects nor are they class types. You can try extending with the use of extensions but the internal behaviours of the components are private APIs except for what is already available as public APIs.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to Xcode 13.2.1 Preview
Notes The command below also works with 13.x.x https://developer.apple.com/documentation/xcode-release-notes/xcode-13_3-release-notes Xcode SwiftUI Previews may occasionally fail with an error message about a modified .hfile, such as “file Header.h has been modified since the module file Module.pcm was built: mtime changed.” (85938686) Workaround: Delete the Clang module cache by running the following command in Terminal: rm -rf "$TMPDIR/../C/clang/ModuleCache". Then try to preview the file again.
Replies
Boosts
Views
Activity
Feb ’22
Reply to How can I let my app run like Google Maps even when the app is in the background and still continue to fetch the user's real location?
You can begin by reading here. https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/LocationAwarenessPG/RegionMonitoring/RegionMonitoring.html#//apple_ref/doc/uid/TP40009497-CH9-SW1
Replies
Boosts
Views
Activity
Feb ’22
Reply to How to move objects to the right side?
Confirm the base language of the project used for localization. This should happen automatically based on your computer's or mobile device's default language, the project's default or base localization language without you having to force it.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to SwiftUI: How to go back to the previous instance in a navigationlink in a list
That should be embedded in a NavigationView.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’22