HStack with multiple buttons

In the SwiftUI class, you suggested adding .buttonStyle(BorderlessButtonStyle()) in order to stop both buttons from firing in the HStack in the CreateHypedEventView file. This does not seem to work for me. I even tried running your source code, and I ended up seeing the same problem. I was just curious if you’ve noticed this behavior in the latest version of Swift. All the online suggestions recommend adding the buttonStyle, but something must have changed with that technique. Thanks. I’m enjoying your iOS courses and learning a lot!

Hey Jim! No I hadn’t noticed that. Could you remind me what line of code that is on? I’ll take a look and see if there’s a fix for it.

Hopefully this next version of SwiftUI is a little more stable :smiley:

In the CreateHypedEventView, line 62 and 71. This is from the “2 - HypedList after iPhone.zip” source code file. To reproduce, add a photo to the event, and then click on the image to select another one. At this point if you tap Remove Image it brings up the Image Picker. Don’t spend a lot of time on it since its not causing me any trouble. I thought it might have to do with the buttonStyle(BorderlessButtonSytle()), but I’m not sure. Thanks Nick.

Here ya go Screen Capture on 2021-07-13 at 11-34-21.mov - Droplr

Thanks Nick for looking at it. You did exactly what I did to cause the issue. No problem though. It’s not causing me any trouble. I appreciate you taking a look for me.

1 Like