All Questions
10,306
questions
1
vote
2
answers
39
views
Placeholder text color of a TextField is not getting changed if the text is a link in SwiftUI
I found an issue with TextField in SwiftUI. I used a TextField in my app and set a placeholder that is a link like 'www.abcdefg.com'. However, the placeholder color is blue instead of gray. I don't ...
0
votes
1
answer
31
views
Render Chinese characters correctly in iOS
I have certain Chinese text in my app that I want to make sure appears in regular script. It currently renders like this on the phone:
However, I want it to render like this so that it looks more ...
-1
votes
0
answers
39
views
How do relationships not cause infinite loops?
So I'm still learning SwiftData and the one thing I cannot get my head around is how relationships don't cause infinite loops.
For example, using SwiftData, if you want to list all the films an actor ...
0
votes
2
answers
106
views
How to show String of array text in curve shape in SwiftUI?
I need array of text should scroll in curve shape like below:
Code: but with this code i can create green colour curve shape view but how to show array of text in curve shape ? please help me to ...
0
votes
1
answer
35
views
Coloured options in a drop down Picker using ForEach in Swift UI
I'm interested in creating menu similar to one displayed in the screenshot below.
This menu is accessible via Rules settings of Mail.app. I'm interested in colouring the symbol on the left hand side. ...
-2
votes
1
answer
60
views
Binding/Pass-By-Reference for Array from Struct to Struct
I have one struct, struct DropletsView: View {} which has the following array: @State private var savedQuotes: [Quote] = [] (Quote is defined elsewhere, as a custom type for my app).
I would like to ...
0
votes
0
answers
61
views
Swiftdata crash when I try to delete some groups in the playlist
I guess something is wrong with my relations, I'm try to loop into the groups array and delete each one expecting that by cascade it delete also all the playlist items.
I structure my model as follow:
...
0
votes
0
answers
36
views
ContentUnavailableView causing entire page to be gray
I have add a List of workout that before I extracted to a subview would show the ContentUnavailableView as normal but since extracting it to a subview it now the ContentUnavailableView shows up but ...
-1
votes
1
answer
38
views
How to return Array<Array<String>>'s descendant's same elements?
I have an array of array of strings and I need to return descendant's same elements (not index wise, self wise).
let arrayArrayStrings: [[String]] = [
["a", "b", "e", &...
0
votes
1
answer
34
views
How to to loop through portion of Array in Swift
I want to loop through a portion of an Array in Swift, not the entire array based on the index. The array is coming from an API so I don't know the number of elements in advance.
For example for the ...
2
votes
1
answer
82
views
Is it possible to join two SwiftData models into a single list?
I have three models SwiftData - a parent Event related to two others. I am trying to write a query that joins the two sub-models and filters to only show the results that match the selected event.
...
0
votes
1
answer
39
views
How to do a Deep Copy in SwiftData
I have a workout model:
@Model
class Workout {
var id: UUID
var name: String?
@Relationship(deleteRule: .cascade) //when deleting a workout you delete all exericses that happened ...
0
votes
0
answers
74
views
Is it possible to loop a SwiftUI ScrollView to repeat infinitely?
I have a horizontal scroll view and a fixed array. I would like to loop it such that when I scroll left and get near the end, the array will add the items in the beginning to the end so that the user ...
0
votes
0
answers
52
views
Referencing instance method requires that 'srfidTagData' conform to 'PersistentModel'
So I'm currently running into an issue where when I'm using this library I'm trying to create an array of the tag data inside the model, it worked perfectly fine before with strings but I'm getting ...
1
vote
1
answer
36
views
How can I print all the relevant elements of an array fetched from an API as labels in a tableview cell using rxswift?
My model is like this;
import Foundation
struct TimeStamp: Decodable
{
let status : String
let message: String
let zones: [Zone]
}
struct Zone: Decodable
{
let countryCode : String
...