All Questions
119
questions
0
votes
0
answers
20
views
Piechart angle selection on tapping a sector instead of touch and hold gesture using SwiftUI Chart framework
I have created piechart using swiftUI Chart framework. Also made the chart interactive by using chartAngleSelection modifier. But, this will work only when we touch and hold the sector of Pie chart. ...
-5
votes
0
answers
124
views
'onChange(of:perform:) was deprecated in iOS 17.0: Use onChange with a two or zero parameter action closure instead? [closed]
struct SudokuCellView: View {
@Binding var value: Int?
var onCommit: (Int?) -> Void
var body: some View {
TextField("", value: $value, formatter: NumberFormatter())
...
1
vote
0
answers
24
views
Is it possible to actually eliminate the small padding-border areas on Dynamic Island? Essentially change the BG color of Dynamic Island?
The actual black curved border (at "A") is great.
But if you try to use color fill up to that border, there is padding at the edges and indeed between the four areas - pointers "B" ...
0
votes
1
answer
94
views
How to get and display country name as 2 letters rather than full country name
I am trying to implement the Country Codes in my app for Phone Auth Login. This is a SwiftUI app using iOS 17 and below is the code i am using to implement this but it is printing out the full ...
0
votes
1
answer
41
views
Observable Toggle Communication Failure
I have an app that will play a confirmation tone if a toggle switch is set. Because the tone may be played for different actions throughout the app, I store the toggle status in the SoundManager class....
1
vote
1
answer
76
views
How to fix map annotation selection issues in iOS 17?
I'm working on MapKit for SwiftUI using iOS 17, where I have a custom annotation. When an annotation is selected, a DetailsView should be shown, but it does not work as expected.
Selecting an ...
0
votes
0
answers
44
views
Crashed: com.apple.network.connection EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000d25b5b890
i have strange crash on OS version: iPadOS 17.1.0 ,i can't reproduce.
Crashed: com.apple.network.connection-208
0 libobjc.A.dylib 0x3150 objc_retain_x23 + 16
1 Network ...
1
vote
1
answer
50
views
Adjust padding on wrapped lines in TextField (Swift)
I am using a multiline text field that wraps the text vertically to new lines. Is there a way to adjust the padding for the wrapped lines, not including the first line? I am trying to have subsequent ...
0
votes
1
answer
142
views
How to Add a New Marker by Tapping on a Map in SwiftUI iOS 17?
I am trying to achieve a similar functionality to Google Maps.
When my user clicks on an existing marker, a sheet pops up showing them a page with the details of the marker.
However, if they click on ...
0
votes
1
answer
162
views
How to decouple Swift Data from a SwiftUI view in order to make the view available as a Swift Package?
I am working with Swift Data (iOS 17 or higher only) and SwiftUI on iOS.
This question is probably only worth reading (or deciding whether to vote to close!!!) if you are highly active with this ...
0
votes
1
answer
38
views
In SwiftUI how to refer to a "subclass -like" View struct as a variable, in View setup code?
I have a number of cute premade structs,
///Cute green flag icon
struct YahIcon: View {
var body: some View {
Image(systemName: "flag.checkered")
.symbolRenderingMode(...
-1
votes
1
answer
47
views
How to move ZStack from bottom when View is presented SwiftUI iOS 17.4?
I'm trying to show ZStack with animation from bottom when View is presented on screen.
Code below doesn't work.
I'm new and I don't know what is wrong with this?
Where the withAnimation should be, and ...
0
votes
1
answer
147
views
Create gradient with tint color in SwiftUI
When styling a view in SwiftUI, I can use .foregroundStyle to apply a custom shape style, e.g.
view.foregroundStyle(.green)
Besides colors, I can use some more "advanced" shape styles. For ...
0
votes
0
answers
53
views
Why SwiftUI Map Annotation is not updating its title immediately with the selected place name?
The issue I'm encountering with the 'identifiableMapItem.mapItem.name' displaying “Unknown Location” initially and then updating only after another annotation is added.
It seems to be related to the ...
0
votes
0
answers
21
views
Is it possible to completely clear this part and have a custom widget showing on iOS 17?
This part right here, would it be possible to have it remove completely, instead of it showing half of the date when you want to put a widget up there?
I can't seem to find a way to do this on Xcode ...