All Questions
10,310
questions
-2
votes
0
answers
17
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
90
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
32
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. ...
0
votes
1
answer
21
views
How to pass CoreStoreObjects to SwiftUI - potentially using Combine or RxSwift [closed]
I have been implementing CoreStore after previously using SwiftData. I have inserts and predicates working, but I have not succeeded at displaying any data in a view. One complication is that each ...
-2
votes
1
answer
58
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
59
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
74
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
34
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
68
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 ...
-1
votes
0
answers
41
views
"Cannot find ... in scope" Error after creating a git repository
I have an app that I've been working on in Xcode and I recently created an git repository for it using the terminal.
Since doing this, errors will occasionally come up while in a swift file, saying ...
0
votes
0
answers
45
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
...