Post

Replies

Boosts

Views

Activity

Reply to HStack TextFields
There's no way to show it because SwiftUI won't allow it. Do you see the white space between the yellow and green? I don't want that. I want there to be gray in between them. Similar to the way they would be if they were stacked vertically:
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’22
Reply to Reversing string with ignoring characters
Have you considered removing the spaces, saving the location of the spaces relative to the beginning, executing the reverse part, then replacing the spaces with the same location but from the end instead of the beginning? I’m not sure how you want your spacing to work with some letters moving and some letters not moving because a letter stating in place may increase the length of the word which would screw everything up. Try that and let me know what tweaks need to be made and maybe we can brainstorm.
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’22
Reply to FetchedResults to Array (Error)
Okay so I’ve finally found somewhere else that said you can’t use a fetch request outside of a view. But if I pass in the fetch request made in the view as a parameter I wouldn’t be able to use the dynamic string searchingFor in the declaration of my FetchRequest. Any ideas?
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’22
Reply to Testing CloudKit Apps using the simulator
So I just ran an app that has CloudKit on my iPhone and iPad to text if what I heard, which was that you needed to be part of the Apple developer program to use CloudKit, was true. And the data that I inputted on my phone was not going to my iPad. So if you pay $100 annually, which isn’t a bad investment if you plan on doing this for a while and getting in bested, for the Apple development program.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’22
Reply to Where do I start?
CodeWithChris is a good place to start. He makes videos teaching the basics to swift and SwiftUI. Also YouTube is a good way to learn stuff. If you have previous coding experience start with a small project and look up solutions or post on here when you run into a roadblock. If you have no previous coding experience follow CodingWithChris’s tutorial and then make a small project.
Jun ’22
Reply to Searching with @FetchRequest
I’m getting some errors from: func searchResults(searchingFor: String) -> [Recipe]{         var searchRecipes=recipe.filter({$0.title.contains(searchingFor)})         return searchRecipes     } 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
Reply to How to auto adjust the height of list row in edit mode?
Replace your ListEditTest file with this code or just add the .frame() part. I've changed everything to work in your file just replace the comment with an INT. import SwiftUI struct ListEditTest: View {     @State private var selects: Set<Int> = []         var body: some View {             VStack{                 EditButton()                 List(selection: $selects){                     ForEach(1..<5){                         ItemInList(num: $0)                     }                     .frame(height: /*Preferred height of each item as an INT*/)                 }                 .listStyle(PlainListStyle())             }         } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’22
Reply to HStack TextFields
There's no way to show it because SwiftUI won't allow it. Do you see the white space between the yellow and green? I don't want that. I want there to be gray in between them. Similar to the way they would be if they were stacked vertically:
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to HStack TextFields
That didn't work
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to Apple developer program
Open settings > Apple ID (top option) > Subscriptions > Apple Developer > "Cancel Subscription"
Replies
Boosts
Views
Activity
Jun ’22
Reply to Weird Errors When Adding a Core Data Entity
Is there something that needs to be added in the persistence file when making a relationship??
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to Weird Errors When Adding a Core Data Entity
Not sure if this helps, but here's the data model
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to Reversing string with ignoring characters
Have you considered removing the spaces, saving the location of the spaces relative to the beginning, executing the reverse part, then replacing the spaces with the same location but from the end instead of the beginning? I’m not sure how you want your spacing to work with some letters moving and some letters not moving because a letter stating in place may increase the length of the word which would screw everything up. Try that and let me know what tweaks need to be made and maybe we can brainstorm.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to FetchedResults to Array (Error)
Okay so I’ve finally found somewhere else that said you can’t use a fetch request outside of a view. But if I pass in the fetch request made in the view as a parameter I wouldn’t be able to use the dynamic string searchingFor in the declaration of my FetchRequest. Any ideas?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to Testing CloudKit Apps using the simulator
So I just ran an app that has CloudKit on my iPhone and iPad to text if what I heard, which was that you needed to be part of the Apple developer program to use CloudKit, was true. And the data that I inputted on my phone was not going to my iPad. So if you pay $100 annually, which isn’t a bad investment if you plan on doing this for a while and getting in bested, for the Apple development program.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to No reply for requesting an Entitlement
What exactly does driverKit do?
Topic: App & System Services SubTopic: Drivers Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to How to speed up compile the assets catalogs in the Xcode
All I can think to do is lower the quality of the images, but you obviously don’t want to do that. You may just have to deal with the long compile time as long as it doesn’t affect the user when they open the app.
Replies
Boosts
Views
Activity
Jun ’22
Reply to Where do I start?
CodeWithChris is a good place to start. He makes videos teaching the basics to swift and SwiftUI. Also YouTube is a good way to learn stuff. If you have previous coding experience start with a small project and look up solutions or post on here when you run into a roadblock. If you have no previous coding experience follow CodingWithChris’s tutorial and then make a small project.
Replies
Boosts
Views
Activity
Jun ’22
Reply to Searching with @FetchRequest
I’m getting some errors from: func searchResults(searchingFor: String) -> [Recipe]{         var searchRecipes=recipe.filter({$0.title.contains(searchingFor)})         return searchRecipes     } 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
Reply to Data Persistence using Core Data
Also see https://youtu.be/tww2vbJjXpA for CloudKit (sharing data between the user's devices)
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to Data Persistence using Core Data
https://youtu.be/nalfX8yP0wc An explanation of core data given by Xcode
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’22
Reply to How to auto adjust the height of list row in edit mode?
Replace your ListEditTest file with this code or just add the .frame() part. I've changed everything to work in your file just replace the comment with an INT. import SwiftUI struct ListEditTest: View {     @State private var selects: Set<Int> = []         var body: some View {             VStack{                 EditButton()                 List(selection: $selects){                     ForEach(1..<5){                         ItemInList(num: $0)                     }                     .frame(height: /*Preferred height of each item as an INT*/)                 }                 .listStyle(PlainListStyle())             }         } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’22