Post

Replies

Boosts

Views

Activity

Reply to Why does ForEach initialize its Child View twice as much in SwiftUI?
I encountered this problem for a LazyVStack. My solution worked for me. Once you determine that the ForEach is called twice, use some debugging to determine where and why the view may be re-rending twice. Sometimes swift may re-render a view and in this case the ForEach may appear twice inside the VStack, as ForEach acts as its own Collection for views. https://developer.apple.com/documentation/swiftui/foreach As for the debugging part, try putting a .onAppear( //print something and add a break point ){} on the ForEach (Tested), if it is called twice you know that it is re-rendered twice. 1 - see the changes that occur between the first break point and the second break point to see the changes I hope this can help someone else that experiences the same issue.
Jan ’24
Reply to Cannot preview SwiftUI
I had this problem when I added a folder and was using the cloud storage. I simply removed the folders added and added them again. Make sure to select both "Create Groups" and "Create Items ..". Usually it is "Create a folder reference" by default. I hope this information can help someone looking for a quick solution.
Dec ’21
Reply to Sign In With Apple, Remove An individual User
Okay I figured it out. However, the nonce part can be made upon each request call, not just the original. To Remove a User: You can do this from the iPhone Settings. Open the Settings app then tap on your name at the top. Then press "Password & Security", then "Apple ID logins". They should all be listed there and can be deleted (Stack OverFlow) Next on the request ( let request =ASAuthorizationAppleIDProvider().createRequest() ) just do request.nonce = "Your Unique String" After that you should be able to use that information to prevent various hacking methods.
Oct ’20