SwiftUI Bottom Sheet - Resizable

Поделиться
HTML-код
  • Опубликовано: 4 сен 2024

Комментарии • 50

  • @seanallen
    @seanallen  Год назад

    My iOS Developer Courses - seanallen.teachable.com

  • @MrMm2004
    @MrMm2004 Год назад +1

    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!

    • @seanallen
      @seanallen  Год назад +1

      Happy to help, Marcus!

  • @EmmaKAlexandra
    @EmmaKAlexandra Год назад +3

    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!

    • @seanallen
      @seanallen  Год назад +5

      On the bright side... deleting old code is one of the best feelings in the world :)

    • @EmmaKAlexandra
      @EmmaKAlexandra Год назад +2

      @@seanallen I love a red diff

  • @ColeDano
    @ColeDano Год назад +1

    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!

    • @seanallen
      @seanallen  Год назад +1

      Glad you enjoyed them, Cole!

  • @martinmajewski
    @martinmajewski Год назад

    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.

  • @chadgoodyear7905
    @chadgoodyear7905 Год назад +1

    Nice. I like the reverse video explanation order.

    • @seanallen
      @seanallen  Год назад

      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.

  • @af2b
    @af2b 10 месяцев назад +1

    Amazing!

    • @seanallen
      @seanallen  10 месяцев назад +1

      Thank you! Cheers!

  • @midnight161
    @midnight161 Год назад

    Thank you for this! Just what I was looking for!

  • @TheChickenDuy
    @TheChickenDuy Год назад +2

    Can't make the dimmable background interactable and can't make it resize to content inside :(

  • @piyushsharma1638
    @piyushsharma1638 Год назад +1

    We cant interact the underneath map using these sheets, half modal purpose is to have interactive views simultaneously, any solution for that?

  • @mkhasson97
    @mkhasson97 Год назад +1

    Nice tutorial 👏🏻👏🏻👏🏻

  • @ChristopherCricketWallace
    @ChristopherCricketWallace Год назад +1

    well done, sir

  • @tripleverbosity
    @tripleverbosity Год назад

    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.

  • @Stricken174
    @Stricken174 7 месяцев назад

    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)

  • @vanylaskywalker
    @vanylaskywalker 8 месяцев назад

    How do you align the content of the sheet to the top instead of centered.

  • @f00kwhiteblackracismwarsh07
    @f00kwhiteblackracismwarsh07 Год назад

    Hi, Allen always great video, btw
    will you also include quizs and exercises in your next IOS 16 update?

    • @seanallen
      @seanallen  Год назад

      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.

  • @rasheshbosamiya1482
    @rasheshbosamiya1482 7 месяцев назад

    I have a TabView and want to present Bottom Sheet above the TabView, how can I achieve?

  • @TerranceBaptiste1977
    @TerranceBaptiste1977 10 месяцев назад

    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?

  • @ahmedhamdy7168
    @ahmedhamdy7168 Год назад

    is there any option to adjust the height of bottom sheet if my app support iOS 15 ?

  • @adamhelman3311
    @adamhelman3311 Год назад +1

    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?

    • @seanallen
      @seanallen  Год назад

      Yup, that is another way of doing it.

  • @perrygupta
    @perrygupta 10 месяцев назад

    ios 16 only, thats a bummer

  • @EmanNollase
    @EmanNollase Год назад

    so sad that this only available on iOS16 and newer

  • @kironet
    @kironet Год назад

    I wish they'd port it to iso15... Does anyone know a good package? :D

  • @juancarlosrangel2128
    @juancarlosrangel2128 Год назад

    Hello, I have a question. How Can I detect when de .sheet is dragged? And get his size height?
    Thank you

  • @zehaolee7201
    @zehaolee7201 Год назад

    how to make the contents of sheet react to the change of fraction?

    • @seanallen
      @seanallen  Год назад

      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.

  • @benjimandel4836
    @benjimandel4836 Год назад

    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?

    • @benjimandel4836
      @benjimandel4836 Год назад +1

      Amazing tutorial btw

    • @seanallen
      @seanallen  Год назад +1

      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.

    • @benjimandel4836
      @benjimandel4836 Год назад +1

      @@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.

  • @colephelps7321
    @colephelps7321 Год назад

    Show what works in ios 14

    • @seanallen
      @seanallen  Год назад

      You need to build your own custom view pre-iOS 16

    • @colephelps7321
      @colephelps7321 Год назад

      @@seanallen Okay. Is there a tutorial from you on how to build such custom UI?

  • @yourgflikesit
    @yourgflikesit Год назад +1

    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.

    • @MikaelaCaron
      @MikaelaCaron Год назад

      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

  • @bjp_for_2024
    @bjp_for_2024 10 месяцев назад

    code pls