Post

Replies

Boosts

Views

Activity

Comment on FetchedResults to Array
So my FetchedResults is gotten from this: @FetchRequest(sortDescriptors: [SortDescriptor(\.date, order: .reverse)]) var recipes: FetchedResults<Recipe> and I need to put the data (list of recipes) from that into my array of recipes: @State private var searchArray = [Recipe]()
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’22
Comment on Searching with @FetchRequest
I’m getting some errors when I try that. What do I need to do to fix this? •Value of optional type 'String?' must be unwrapped to refer to member 'contains' of wrapped base type 'String' •Chain the optional using '?' to access member 'contains' only for non-'nil' base values •Force-unwrap using '!' to abort execution if the optional value contains 'nil'
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’22
Comment on List Background
So what should I use to display my list if List doesn’t allow for customization? What’s a “Radar” Sorry, I’m relatively new to this as I’m sure you can tell lol.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Comment on FetchedResults to Array
So my FetchedResults is gotten from this: @FetchRequest(sortDescriptors: [SortDescriptor(\.date, order: .reverse)]) var recipes: FetchedResults<Recipe> and I need to put the data (list of recipes) from that into my array of recipes: @State private var searchArray = [Recipe]()
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’22
Comment on Default Keyboard Toolbar
Yes, for an app. I’ve looked up inputAccessoryView and everything that I’ve found has been custom made. Is there no default toolbar that looks like what I see every time I open a TextField everywhere else?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Comment on Searching with @FetchRequest
I’m getting some errors when I try that. What do I need to do to fix this? •Value of optional type 'String?' must be unwrapped to refer to member 'contains' of wrapped base type 'String' •Chain the optional using '?' to access member 'contains' only for non-'nil' base values •Force-unwrap using '!' to abort execution if the optional value contains 'nil'
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22