Hi all, I have just started to learn swiftUI for macOS, and am struggling with the view set-up. The view below is the one I am trying to achieve. I had no issues with using navigation view to get the column style with View 1 and View 2&3, being able to stretch/resize each column as well. I have not however been able to make a "stretchable" 'row' view for View 2 and View 3. How can I achieve this? I tried using a Navigation Stack to wrap View 2 and View 3, which gave me the layout I want, though the 'rows' (being View 2 and View 3) are fixed, and can't be resized/dragged, like the columns of View 1 and View 2&3 can. How can I allow resizing between View 2 and View 3 as well, while preserving the overall layout show in the image?
Thank you for the help :)
Post
Replies
Boosts
Views
Activity
Hi all, I am creating a little mobile game app, where users can sign in with their Apple ID (Sign in with Apple). During the onboarding, I also set some UserDefaults in @ AppStorage. As I code the signOut() feature, I am wondering if I need to set all the user back to their original "" or nil. I understand that for my deleteAccount() feature I will do this, but do I also have to do this for signOut()?
The main reason I can think of having to do this, is if users change their Apple ID on the same device, re-download the app and then sign in - in which case the user defaults may be the same as set using the old Apple ID, right?
So my question is, does an app downloaded on the same device but with a different apple ID keep the original UserDefaults set for that app?
Having to set UserDefaults to nil is no big issue, but from a code efficiency standpoint was wondering if it was necessary.
Thank you for your help :)
Hi,
I am transitioning towards PHPicker for retrieving UI Images. Unfortunately I am noticing that it doesn't have an "allows editing" configuration option, unlike the old image picker.
Anybody know how to handle this externally to still allow users to edit the image selected, so that then that EDITED image can be returned as a new UI Image (to be shown or uploaded)?
Thanks for the help
Hi, I am trying to build a toggle in my app that allows users to override their device colorScheme (light or dark) by toggling the button. However, I want the device colorScheme to be the default toggle of my additional bool var 'isLightMode' (which can then be toggled by the user to change colorScheme). So something like:
@Environemnt(.colorScheme) var colorScheme
@State var isLightMode: colorScheme == .light ? true : false
...
Obviously I know the above doesn't work, but that's the idea.
Any help is much appreciated :D.
The above image is probably the best way for me to describe what I am trying to achieve. I would like the author's profile image to shrink as the user scrolls down, and then become the pinned header. Using geometry reader I was able to get the image to become larger while continuing to scroll up, but can't get it to scale down.
Image will need a minimum size beyond which it won't scale down further even as the user continues to scroll down.
Any suggestions? Thanks!