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:
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 ***** everything up. Try that and let me know what tweaks need to be made and maybe we can brainstorm.
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?
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.
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'
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())             }         } }
Jun ’22