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 HStack TextFields
Each textfield has it's own separated whitespace. I want that, but side by side instead of on top of each other.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Comment on HStack TextFields
I dont want them to share white space between them
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Comment on Enlarged TextField
That sounded like what I needed to hear. I just need to learn how to use storyboard…
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Comment on Weird Errors When Adding a Core Data Entity
So I'm assuming I'm doing something wrong when I created the List entity.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Comment on Weird Errors When Adding a Core Data Entity
Well what's weird is the errors pop up then disappear instantly.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
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 Dark Mode
Clutch! Do I put this under NavView the view?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Comment on Changing Views Bar
yes exactly!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Comment on Filtering an Array
At the end of the first paragraph it says the title is a string that is not optional.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’22
Comment on FetchedResults to Array (Error)
Maybe using .onAppear(perform: { code}) to do the filter or parsing?
Topic: Programming Languages SubTopic: Swift 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 Core Data Entity Inside Another Entity
nah a planned recipe is basically a date containing up to 3 recipes. One for breakfast, lunch, or dinner. But a recipe can only be assigned to one date.
Topic: UI Frameworks SubTopic: SwiftUI 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
Comment on How to auto adjust the height of list row in edit mode?
I would make a Int var called textHeight and inside of the ForEach loop set textHeight to a value based on the length of the item
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22