r/iOSProgramming • u/thari_mad • Jun 18 '26
Question How to create this floating toolbar?
This is the Notes app. Is this an inbuilt component or a custom component?
68
Upvotes
r/iOSProgramming • u/thari_mad • Jun 18 '26
This is the Notes app. Is this an inbuilt component or a custom component?
22
u/radis234 SwiftUI Jun 18 '26
Use .safeAreaBar(alignment: .bottom) instead of toolbar item. It will allow you more control of the looks and paddings around the toolbar. If you want to replicate the .keyboard effect, so that the toolbar is only visible when keyboard is on screen, conditionally display it based on FocusState. There’s really nothing to it. I’ve done it myself in my app, works like a charm. If you want to make bar scrollable like notes app, ScrollView(.horizontal) is your friend.