Easy Custom Animated Tab Bar in SwiftUI Tutorial for iOS 15

  Переглядів 28,870

Indently

Indently

2 роки тому

Today we will be looking at how we can create a very easy and fully customizable tab bar in SwiftUI. It will also have some small animations to make the whole UX feel smoother.
Source code: github.com/federicocotogno/Cu...

КОМЕНТАРІ: 47
@jotee804
@jotee804 2 роки тому
Very cool and useful, great work
@user-yv3yo6it9v
@user-yv3yo6it9v 9 місяців тому
Thank you boss, really appreciate this
@abdouett3676
@abdouett3676 2 роки тому
Great work! Thanks!
@fhazel291
@fhazel291 2 місяці тому
Thank you, this was very useful and clear
@peteandloistri7270
@peteandloistri7270 10 місяців тому
Thanks for this dude 👍
@shafferzeyn9710
@shafferzeyn9710 2 роки тому
you are perfect channel
@Stricken174
@Stricken174 Рік тому
Thank you!
@jordan2899ify
@jordan2899ify Рік тому
how connect it to a View??
@traissac
@traissac Рік тому
hello i just want know you can put a link a view on each icon, it's possible to add a small code ? Thinks
@ElianasJourney
@ElianasJourney Рік тому
how to connect it in url? (webview)?
@marcelczubak9179
@marcelczubak9179 Рік тому
Hey, great tutorial! Just wondering what's the best approach to linking each Tab button to a specific view. I have a few views created already along with this custom tab, and I want to navigate from view to view in the Tab, without the ForEach loop. Any tips appreciated :)
@Andrew_Pap
@Andrew_Pap Рік тому
Hey, did you find a solution? I have the same question. If you found a way to link the private var tabSelected with a tab number or something else, you can probably do it with an if statement. Up to now I haven't found a way to see in which tab I am.
@marcelczubak9179
@marcelczubak9179 Рік тому
@@Andrew_Pap stuck on the same 😂
@marcelczubak9179
@marcelczubak9179 Рік тому
i’ll look into it
@Andrew_Pap
@Andrew_Pap Рік тому
@@marcelczubak9179 Ok, me too. I'll send a reply if I find anything. Try to maybe also assign a view to the enum elements themselves.
@Andrew_Pap
@Andrew_Pap Рік тому
@@marcelczubak9179 Ok so I found a way to do it. Instead of the ForEach loop you use an if statement: if tabSelected == .house { View() } and then it should be: } } VStack { ...
@gavinbeard8188
@gavinbeard8188 Рік тому
Great tutorial, is there a way to assure that If you have a ListView behind the tab bar, the last item is not obscured by the tab bar when scrolling? I find that if you have a list that goes past the end of the screen, when you scroll to the end of the list the last item is always blocked by the tab bar
@sraldous
@sraldous Рік тому
Add bottom padding to the VStack to match the height of the tabBar
@lenartpapez6058
@lenartpapez6058 Рік тому
@@sraldous But then you lose the ultraThinMaterial effect.
@sraldous
@sraldous Рік тому
@@lenartpapez6058 Try putting bottom padding on the last item in the list, set padding equal to height of the tabbar (60 in this example).
@epicfortnitesongs
@epicfortnitesongs Рік тому
hi, I got a question, What should I do if the sf symbol I want to implement has a . in its name, for example person.circle?
@badseyboy111
@badseyboy111 Рік тому
did you figure this out?
@epicfortnitesongs
@epicfortnitesongs Рік тому
@@badseyboy111 no ☹️
@asadbekabdullaev4463
@asadbekabdullaev4463 Рік тому
did you figure it out?
@DevSibonelo
@DevSibonelo Рік тому
Try this enum Tab: String, CaseIterable { Case locationFill = “location.fill” } I could be wrong but worth a shot
@moh3n493
@moh3n493 3 місяці тому
How to hide this custom tabbar in detail views?
@Andy-we5hr
@Andy-we5hr Рік тому
hi, I got a question, What should I do if the sf symbol I want to implement has a . in its name, for example calendar.circle?
@amolsrivastava3904
@amolsrivastava3904 Рік тому
I also have this question.
@isstylertho
@isstylertho 10 місяців тому
@@amolsrivastava3904 For those that cannot find the answer on how to use this if there is a "." in the name: "Try this enum Tab: String, CaseIterable { Case locationFill = “location.fill” } I could be wrong but worth a shot" Thanks @sibonelogumede5893
@isstylertho
@isstylertho 10 місяців тому
For those that cannot find the answer on how to use this if there is a "." in the name: "Try this enum Tab: String, CaseIterable { Case locationFill = “location.fill” } I could be wrong but worth a shot" Thanks @sibonelogumede5893
@sheetalshinde17
@sheetalshinde17 Рік тому
how to add navigations on tap of every tab ?
@illieehh
@illieehh 3 місяці тому
I have the same question
@louisagareiss
@louisagareiss Рік тому
How to not show the Tab Bar on every View? for example on a Login View
@ShaneCurtis1705
@ShaneCurtis1705 2 місяці тому
Have a main content view then make each page a seperate view that is projected on to the main
@snorkelmonkey2581
@snorkelmonkey2581 2 роки тому
do you need a mac/ios device
@Indently
@Indently 2 роки тому
You need a mac
@douglasrutledge1325
@douglasrutledge1325 Рік тому
pretty tabBar ... but now what? How do we practically give this tabbar substance? Connect it to a View, Bool, Sheet or Navigationlink, anything???
@AdeepaDevinda
@AdeepaDevinda Місяць тому
yeah I just followed the tutorial and wasted about an hour having no idea how to connect with a View if y'all have any idea please let me know thanks
@yrmuq
@yrmuq 9 місяців тому
Cola) eah coolaaa
@isstylertho
@isstylertho 10 місяців тому
I FOUND AN EASIER WAY IF YOU ARE TRYING TO USE A NAME WITH A "." Say you want to use a bulleted list named "list.bullet" you would write case list = "list.bullet" and it works perfectly
@hoshisato2687
@hoshisato2687 Рік тому
I really like this because I have more control over the appearance of the tab bar, especially the rounded ends! However, I wish it were more like the TabView in the docs, where the whole tab-to-view mechanism is just declarative and seamless (and has badges!): TabView { ReceivedView() .badge(2) .tabItem { Label("Received", systemImage: "tray.and.arrow.down.fill") } SentView() .tabItem { Label("Sent", systemImage: "tray.and.arrow.up.fill") } AccountView() .badge("!") .tabItem { Label("Account", systemImage: "person.crop.circle.fill") } }
@isstylertho
@isstylertho 10 місяців тому
For those that cannot find the answer on how to use this if there is a "." in the name: "Try this enum Tab: String, CaseIterable { Case locationFill = “location.fill” } I could be wrong but worth a shot" Thanks @sibonelogumede5893
SwiftUI Navigation - NavigationView & NavigationLink Tutorial
17:34
Sean Allen
Переглядів 89 тис.
Завтра в школу с... | Шоу-квиз «Вопросики»
00:28
Телеканал СОЛНЦЕ
Переглядів 3,2 млн
The Future Plans For Robots And Ai Are Insane
11:01
Globe Mysteries Revealed
Переглядів 82
Python's 5 Worst Features
19:44
Indently
Переглядів 36 тис.
How to Make an Animated Underline Tab Bar! (SwiftUI)
15:33
Jared Davidson
Переглядів 12 тис.
Create a Shopping App with Apple Pay in SwiftUI from scratch - Part 1
33:23
How to Build a Custom Tab Bar in SwiftUI
26:22
CodeWithChris
Переглядів 31 тис.
SwiftUI - TabView Tutorial
3:36
Sean Allen
Переглядів 35 тис.
How to Create a Custom Tab Bar in SwiftUI - Step by Step for Beginners (2023)
16:28
A Swiftly Tilting Planet
Переглядів 10 тис.
5 Useful Python Decorators (ft. Carberra)
14:34
Indently
Переглядів 75 тис.
SwiftUI How to create Custom Tab View with Tab Bar
24:40
Lets Build That App
Переглядів 43 тис.