Create a custom navigation bar and link in SwiftUI | Advanced Learning #12

Create a custom navigation bar and link in SwiftUI | Advanced Learning #12

Swiftful Thinking

2 года назад

36,855 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@yuriisushko7658
@yuriisushko7658 - 17.11.2023 19:14

Thank you for the great video. Maybe it will help someone. When writing a function in the view extension for PreferenceKey, if you use "text" as a function parameter name (function updateNavigationTitle(_ text: String)), it will not work.

Ответить
@WeirdTKJackson
@WeirdTKJackson - 03.11.2023 14:02

Nick, I have a big problem which needs your help. After I create preference keys and the function such as "setNavTitle" in "extension View", if I don't watch your video, the first place I will go and edit is the "CustomNavBarView.swift" instead of "CustomNavBarContainerView.swift" since the "CustomNavBarView.swift" directly itself has the definition of navTitle with "Text(titleString)" in "titleSection". So, I would add a ".onPreferenceChange(PreferenceKeyNavTitle.self, perform" after the VSTACK which includes the "Text(titleString)". But after I did this, it does not work, why?

Ответить
@SwiftDeveloperWorld
@SwiftDeveloperWorld - 30.09.2023 15:25

why do you use private?

Ответить
@vishalsrivastav7222
@vishalsrivastav7222 - 21.09.2023 21:23

Nice, your video is very help for me in developing ,
I'm facing a problem to navigation related,
actually i want to navigate from inside the function (after getting api's response)
so,
could you send me video related this issue
please

Ответить
@barche75
@barche75 - 10.09.2023 15:26

Super cool idea 👍. Thank you so much 😊

Ответить
@josemanuelortizsanchez4983
@josemanuelortizsanchez4983 - 30.08.2023 23:05

You are the best!

Ответить
@glebcherkashyn2357
@glebcherkashyn2357 - 20.08.2023 03:29

nice! what about transition animations for nav bar? :D

Ответить
@ekucet
@ekucet - 29.07.2023 22:49

Hello Nick firstly you are the king :), this is awesome tutorial this topic. But I have a question, if I want hide the CustomNavBar on specific scene, how can I do this?

Ответить
@the_weird_human
@the_weird_human - 19.07.2023 09:51

Wonderfully explained! 👏

Ответить
@Designguidetv
@Designguidetv - 13.07.2023 14:50

this makes total sense, of course I will need to come back to it when I actually build something but, awesome!

Ответить
@NaveenKumarIOS
@NaveenKumarIOS - 05.05.2023 14:59

Thank you very much dude!

Ответить
@user-nj8xy2kc3x
@user-nj8xy2kc3x - 21.04.2023 08:55

if you apply background color to CustomNavBar through PreferenceKey it is not applying clear color to background instead it is display default white color why but if you aplly any other color then it is working, can you check with that. Your videos are great!

Ответить
@jacobzheng3792
@jacobzheng3792 - 15.04.2023 01:26

Hi nick, great work!I wonder if there is a way to control the back gesture on and off in SwifUI. Because sometimes there are actions in the Destination View that don't want to trigger the back gesture, you can use the back gesture after the action is done.

Ответить
@user-hz7sd3hw8j
@user-hz7sd3hw8j - 10.04.2023 08:40

Hi Nick, how can i intercept for custom back button action?anyone can help me on this?

Ответить
@leilaleila7802
@leilaleila7802 - 16.02.2023 17:16

😍

Ответить
@riturajmishra2672
@riturajmishra2672 - 10.02.2023 13:06

Woah Nick, thanks for this wonderful video and this one is already one of my favourite SwiftUI videos! One question: Is there any way wherein we stack up the navigation screens and then with one single close or back,we come back to the base navigation screen? Thanks again!

Ответить
@sraldous
@sraldous - 27.01.2023 01:34

Good tutorial, thanks, however I have a question. If I want to round the bottom corners of the CustomNavBarView, how would I do this? When I try it also clips the top around safe area.

Ответить
@AlexBlack-xz8hp
@AlexBlack-xz8hp - 20.01.2023 01:14

This is incredibly cool! thanks for making this video. I learned a lot!

Ответить
@FlashGamer521
@FlashGamer521 - 15.01.2023 13:10

Can't believe how much work is required for something so seemingly simple.

Ответить
@yasalmasri
@yasalmasri - 03.01.2023 07:56

you are amazing, you saved my life.

Ответить
@brianvieira8662
@brianvieira8662 - 26.12.2022 22:47

Would be the same , using navigation stack ? Great content, keep it up.

Ответить
@penguinwolf0125
@penguinwolf0125 - 09.12.2022 02:18

Amazing...

Ответить
@omoge7825
@omoge7825 - 01.12.2022 14:40

You are a life saver! Thank you for this!

Ответить
@marcusarkan4607
@marcusarkan4607 - 29.11.2022 15:43

I had to watch this twice, the first time to code along and the second time to understand what just happened :D. I love these videos and hope you continue to make more. We all appreciate it, and to that end, I am becoming a buymeacoffee supporter.

Ответить
@arunmurugan5196
@arunmurugan5196 - 25.11.2022 09:59

How to hide this custom navigation bar??? When no need to show.....

Ответить
@mahmoudzinji5672
@mahmoudzinji5672 - 23.11.2022 14:02

`Hello Nick
ANy Tutorial on map in SwiftUI for an end result like Uber Apps or food delivery apps, If NO, can u suggest any resource ?

Ответить
@Seepho
@Seepho - 31.10.2022 15:57

Hi, Nick! As always nice video! I have a question about interactivePopGestureRecognizer. I have XCode ver. 13.4.1 and extension UINavigationController doesnt work. What could be the problem?

Ответить
@3ilz
@3ilz - 31.10.2022 00:16

very cool!

Ответить
@elliotcossins8417
@elliotcossins8417 - 08.10.2022 01:57

Just looked for an hour to find how to disable back button and your the only one who can tell me in 1 line of code thank you!

Ответить
@vlafon1
@vlafon1 - 06.10.2022 00:14

thx very nice code. great job, this video it's my way in ios developer

Ответить
@stefanmuller7818
@stefanmuller7818 - 11.09.2022 20:13

Hey :) Thanks for that amazing video! :) One question: how can we pass a custom view dynamically to the CustomNavBarView? I would call from everywhere ".customNavBarTrailingButton(Button("test") { print("test") }) like .customNavBarItem(<...>), so I can set a trailing navbarItem button dynamically. But here we handle strings etc. with PreferenceKeys. This is not possible with Views :/ I would highly appreciate an answer :)

Ответить
@cactuscot
@cactuscot - 04.09.2022 10:23

Thank you for all your efforts!!! You’re amazing

Ответить
@sajjadsarkoobi
@sajjadsarkoobi - 08.08.2022 20:17

Hi, Thanks for your Videos. I am wondering how to create CustomNavLink with isActive Binding?

Ответить
@maciejlipiec1972
@maciejlipiec1972 - 28.07.2022 00:20

You are the KING here! I was looking for this solution really long time. You are much better than stack overflow and all available courses when it comes to SwiftUI. Thank you! I appreciate that.

Ответить
@lucagfc
@lucagfc - 13.07.2022 22:48

You deserve a lot more follower. Awesome content. Thank you

Ответить
@user-ic2tx9sb1m
@user-ic2tx9sb1m - 11.07.2022 16:27

Hi! I had a problem with "ignoresSafeArea" - the area above was colored without this modifier. I had to use the modifier .padding(.top, 1) to solve this problem

Ответить
@mystride
@mystride - 02.07.2022 23:05

How do you see the new NavigationStack on iOS16 fitting into this?

Ответить
@xuy2007
@xuy2007 - 24.05.2022 09:36

Where is source code?

Ответить
@varcos
@varcos - 10.05.2022 05:09

This was exactly what I needed but I have one strange issue. I have implemented a tabview on my next internal page and it shows a blank section above my new custom nav. But if I click a customNavLink in one of my tabs that extra space goes away and stays away unless I go back to the main page and click into the tabview again. Anyone have a workaround for that?

Ответить
@Ryan-ff1ob
@Ryan-ff1ob - 02.05.2022 16:26

Is it possible to add the "isActive" feature to custom nav links in this method?

Ответить
@iziman99
@iziman99 - 29.04.2022 13:20

woah, thats some real techniques... This one and the TabView one are very hard, specially those parts with PreferenceKeys. But i am not breaking, I am putting some real work to learn Swift! Thank You for your videos. I haven't found better tutorials than yours. Thank You so much again!

Ответить
@satyaandersen
@satyaandersen - 25.04.2022 09:43

Hey Nick, thanks for the video.

I want to further extend the custom NavLink to support tag and selection. So that I can call NavLink(destination:label:) or NavLink(tag:selection:destination:label) as needed. I'm using the tag:selection for conditions before tap to check if user has premium access. If true continue, if not display paywall sheet.

Any tips ?

Ответить
@mhmtkrnlk
@mhmtkrnlk - 19.04.2022 22:03

Hey Nick is there a way to use, UINavigationController in SwiftUI because what i saw on NavigationView its Not possible to go like Page-1>Page-2>Page3>Page-1. Thats to only thing buggin me about SwiftUI.

Ответить
@techno2713
@techno2713 - 18.04.2022 22:34

Great video. This has been extremely helpful. One question though; How would I go about implementing the "isActive" option to the custom nav link?

Ответить
@brucknerdevilliers
@brucknerdevilliers - 16.04.2022 16:20

It seems from SO that we can't have TabViews inside NavViews, but only vice versa. That'll create further complications.

Ответить
@brucknerdevilliers
@brucknerdevilliers - 16.04.2022 14:09

The CustomTabBar & CustomNavBar combination looks good, but I am struggling to get any of the tabs to show a new View. I tried CustomNavLink, NavigationLink and .onTapGesture. These are all non-responsive. Call the View() directly merely slots it at the bottom of the AppNavBarView. Any pointers Nick?

Ответить
@dennismallette258
@dennismallette258 - 14.04.2022 23:42

This is amazing, how did you learn to code? I am still having trouble… I can follow along and make minor changes, but after a year I can not write code on my own yet… aaahhh!

Ответить
@brucknerdevilliers
@brucknerdevilliers - 13.04.2022 16:44

Absolutely awesome - I am now going to try to combine the CustomTabBar & CustomNavBar with some functionality already built into the CustomTabBar. I expect issues.

Ответить
@nigelkrajewski4362
@nigelkrajewski4362 - 30.03.2022 21:04

I've been searching for a way to change the default font for the nav bar title. More work than expected for such a simple change but this is the perfect solution. THANKS!

Ответить