Hi Sean, another great tutorial! I have searched everywhere for this exact tutorial and couldn't find it anywhere and you explain it literally in one minute! Perfect, thanks!
As usual with SwiftUI, I spent a few days building something like this for my app last year. Now, Apple built it in & obsoleted my custom code. Thank goodness!
Good tutorial, thanks. One note: SF Symbols are flattened (pixelated) when applying the resizable modifier. You should thread your SFSymbols image like a text and change its size with .font(...). This way, it aligns with, e.g., neighboring text and stays dynamic to all the fancy UI effects, like Dark Mode.
Thanks! I thought a lot about that actually... I wanted those who are familiar with SwiftUI to get the information ASAP, but also didn't want to neglect those still just learning.
Thanks Sean, nice quick tutorial. I was wondering if you knew of a way to size the sheet based on the size of the context using GeometryReader. I’ve been playing around with it but can’t get it to work. Ideally I’d like my sheet to be just big enough to fit the content.
Unfortunately, Apple doesn't give us the ability to customize the sheet itself. For example, corner radius or background color. Correct me if I'm dumb)
Love the video but now I am stuck with my own mini project. I hope somebody sees this comment, here goes... I have an array of values that I want to display on a sheet like this video but each time I click on let's say an image, it only shows the first set of values. Am I missing something?
About the button- would it have worked just as well if the button style struct that conformed to ButtonStyle was instead conformed to View and then have had the button’s label been an instance of that view?
I don't know. I would need to research that. An app like Maps has the entire view in the sheet, but you can only see the top half of it when in the .medium size. When you swipe up to .large, you see the entire view. But it's not dynamically changing... it's always there. You just can't see it in .medium.
Not that I'm aware of. But this is a brand new modifier in iOS 16. I would need to dig deeper to see if this was possible. An app like Maps has the entire view in the sheet, but you can only see the top half of it when in the .medium size. When you swipe up to .large, you see the entire view. But it's not dynamically changing... it's always there. You just can't see it in .medium.
@@seanallen Got it. Thanks. I thought it would allow for some cool animation, like buttons with icons expanding and adding text. Guess will have to wait to future updates. Maybe it will be added.
Would using a fraction not be good though because on a small screen the icons might be cut off as the height would be a lot small? How would you handle that? Wouldn’t therefore exact height be better.
You could make your icons also size depending on the device size, so those wouldn’t be a set height. But also it could just look different, so if you set 10%, with bigger phones the spacing would just be bigger around the icons compared to the smaller phones
My iOS Developer Courses - seanallen.teachable.com
Hi Sean, another great tutorial! I have searched everywhere for this exact tutorial and couldn't find it anywhere and you explain it literally in one minute! Perfect, thanks!
Happy to help, Marcus!
As usual with SwiftUI, I spent a few days building something like this for my app last year. Now, Apple built it in & obsoleted my custom code. Thank goodness!
On the bright side... deleting old code is one of the best feelings in the world :)
@@seanallen I love a red diff
Good stuff Sean. I'm really liking the iOS 16 updates. Using this right now in my first Indy app. Loved your courses BTW, they really helped a lot!
Glad you enjoyed them, Cole!
Good tutorial, thanks.
One note: SF Symbols are flattened (pixelated) when applying the resizable modifier. You should thread your SFSymbols image like a text and change its size with .font(...). This way, it aligns with, e.g., neighboring text and stays dynamic to all the fancy UI effects, like Dark Mode.
Nice. I like the reverse video explanation order.
Thanks! I thought a lot about that actually... I wanted those who are familiar with SwiftUI to get the information ASAP, but also didn't want to neglect those still just learning.
Amazing!
Thank you! Cheers!
Thank you for this! Just what I was looking for!
Happy to help, Amar!
Can't make the dimmable background interactable and can't make it resize to content inside :(
We cant interact the underneath map using these sheets, half modal purpose is to have interactive views simultaneously, any solution for that?
Nice tutorial 👏🏻👏🏻👏🏻
Thank you 😊
well done, sir
Thanks Chris!
Thanks Sean, nice quick tutorial. I was wondering if you knew of a way to size the sheet based on the size of the context using GeometryReader. I’ve been playing around with it but can’t get it to work. Ideally I’d like my sheet to be just big enough to fit the content.
Unfortunately, Apple doesn't give us the ability to customize the sheet itself. For example, corner radius or background color. Correct me if I'm dumb)
How do you align the content of the sheet to the top instead of centered.
Hi, Allen always great video, btw
will you also include quizs and exercises in your next IOS 16 update?
I assume you're talking about my courses?? If so, I don't have plans to include any quizzes or exercises in the iOS 16 update.
I have a TabView and want to present Bottom Sheet above the TabView, how can I achieve?
Love the video but now I am stuck with my own mini project. I hope somebody sees this comment, here goes...
I have an array of values that I want to display on a sheet like this video but each time I click on let's say an image, it only shows the first set of values. Am I missing something?
is there any option to adjust the height of bottom sheet if my app support iOS 15 ?
About the button- would it have worked just as well if the button style struct that conformed to ButtonStyle was instead conformed to View and then have had the button’s label been an instance of that view?
Yup, that is another way of doing it.
ios 16 only, thats a bummer
so sad that this only available on iOS16 and newer
I wish they'd port it to iso15... Does anyone know a good package? :D
Hello, I have a question. How Can I detect when de .sheet is dragged? And get his size height?
Thank you
did you figure this out?
how to make the contents of sheet react to the change of fraction?
I don't know. I would need to research that. An app like Maps has the entire view in the sheet, but you can only see the top half of it when in the .medium size. When you swipe up to .large, you see the entire view. But it's not dynamically changing... it's always there. You just can't see it in .medium.
Is it possible to see/read the fraction value in the view code of the sheet? i.e., to show less or more content based on the size?
Amazing tutorial btw
Not that I'm aware of. But this is a brand new modifier in iOS 16. I would need to dig deeper to see if this was possible. An app like Maps has the entire view in the sheet, but you can only see the top half of it when in the .medium size. When you swipe up to .large, you see the entire view. But it's not dynamically changing... it's always there. You just can't see it in .medium.
@@seanallen Got it. Thanks.
I thought it would allow for some cool animation, like buttons with icons expanding and adding text. Guess will have to wait to future updates. Maybe it will be added.
Show what works in ios 14
You need to build your own custom view pre-iOS 16
@@seanallen Okay. Is there a tutorial from you on how to build such custom UI?
Would using a fraction not be good though because on a small screen the icons might be cut off as the height would be a lot small? How would you handle that? Wouldn’t therefore exact height be better.
You could make your icons also size depending on the device size, so those wouldn’t be a set height. But also it could just look different, so if you set 10%, with bigger phones the spacing would just be bigger around the icons compared to the smaller phones
code pls