336,301 questions
- Bountied 1
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
2
answers
20
views
Using SwiftUI MapReader to position Views over map
I'm trying to use SwiftUI to make a ZStack containing a Map (with a MapKit map view), and a Circle view that is placed on top of it. The Circle's pixel position should be to the pixel position on the ...
0
votes
1
answer
52
views
Can a TipKit tip be permanently dismissed / marked as displayed by tapping outside the tip?
I am using the TipKit in my iOS 16+ app to show usage hints to the user. Since TipKit is available from iOS 17+ I use the protocoal based wrapper shown below.
While displaying tips works fine in ...
Best practices
0
votes
1
replies
23
views
Reload an iOS widget at midnight UTC
I'm designing my first iOS widget.
It provides a date in UTC time so, the best optimization, would be to refresh it at every UTC midnight. I found this way
let today00 = Calendar.current....
Advice
2
votes
1
replies
63
views
Using Actor is always the best practice in Swift Concurrency world?
I'm generally holding a Task variable to use cancel for an efficiency in somewhere. (and also calling cancel before setting the Task to avoid making duplicate asynchronous job.)
class Test {
private ...
0
votes
0
answers
77
views
iOS 26.1: Modal swipe-to-dismiss freezes on iPhone 14 Pro Max / iPhone 17 / iPhone 17 Pro Max but works on iPhone 11 / iPhone 16e [closed]
.pageSheet interactive swipe-to-dismiss freezes when UIDesignRequiresCompatibility = YES on specific iPhone models (iOS 26.x)
Area
UIKit → View Controller Presentation
Type of Issue
Serious Bug (App ...
-1
votes
0
answers
46
views
CAShapeLayer strokeEnd causes ring flash on tap – how to stop border flash on custom circular progress button (UIKit)? [closed]
I have a custom circular play/pause button in UIKit that uses CAShapeLayer as a progress ring.
Everything works except when I tap the view, the border briefly flashes even though strokeEnd = 0 and ...
-1
votes
0
answers
67
views
'init(traitsFrom:)' was deprecated in iOS 17.0, How do I use the new UITraitCollection.init(mutations:)? [closed]
I am using this file from swift-snapshot-testing library. After updating my project to iOS 26, I need to fix all the warnings. But I am not sure how to fix this one:
'init(traitsFrom:)' was ...
-4
votes
1
answer
97
views
How to securely store the license key based purchases?
I am trying to implement license key logic in my app where users can enter the license key they bought from stripe or any payment provider and than, the entered license key would need to first ...
-1
votes
1
answer
66
views
iOS PDF Kit PDF Compression not reducing PDF Size
I am trying to compress the PDF (to reduce its storage size) and using following code but instead of decreasing storage size, it is increasing it:
import Foundation
import PDFKit
import CoreGraphics
...
1
vote
0
answers
66
views
How to damp `linearDamping` in horizontal (x/z) axes only in RealityKit's physics
In RealityKit, there's a linearDamping that slows down physics velocity with a "drag" effect (or it feels like making the air "thicker").
For example:
var body = ...
Advice
0
votes
0
replies
44
views
AppIntent's perform method to return custom type
Overview
I have a custom type `Statistics` that has 3 properties inside it
I am trying to return this as part of the AppIntent's `perform` method
struct Statistics {
var countA: Int
var ...
3
votes
1
answer
231
views
+100
Smooth horizontal autoscroll while dragging near edges (keep item under finger)
I have a SwiftUI horizontal editor (multiple "canvases" laid out side‐by‐side in a ScrollView). When the user drags a selected object and reaches the left/right edge of the visible area, I want the ...
1
vote
1
answer
97
views
In RealiktKit we are creating objects with MeshResource but we are unable to set different materials for different faces
Using following blocks we are creating front and back of an entity. They are same polygons with some -z distance between them.
We see both side of it when we rotate entity in scene.
Looks like both ...
1
vote
0
answers
80
views
Why does NSEvent.addGlobalMonitorForEvents still work in a Sandboxed macOS app
I am building a macOS utility using SwiftUI and Swift that records and displays keyboard shortcuts (like Cmd+C, Cmd+V) in the UI. To achieve this, I am using NSEvent.addGlobalMonitorForEvents(matching:...
3
votes
0
answers
71
views
Modifying input audio
Is there a way to make audio sound robotic or put some other effects? For example, I have the code, that reverses the audio. But i manually modify it. Is there any library available?
The reverse ...