Swift Coordinator Design Pattern (iOS, Xcode 12, 2022) - iOS Design Patterns

  Рет қаралды 32,689

iOS Academy

iOS Academy

Күн бұрын

In this video we will learn how to use the coordinator design pattern for iOS Apps. The coordinator pattern solves the massive view controller problem as well. Its a staple for every iOS developer to know and understand.
💻 Source Code: / iosacademy
🎥 Subscribe for more: kzfaq.info?su...
😎 Like my teaching style? Check out some of my most popular courses! courses.iosacademy.io
#swift #coordinator #designPatterns
** Like my teaching style? Check out the newly launched How to Build TikTik Course: ios-academy.teachable.com/p/b...
Join this channel to get access to perks, code, groups, and more:
/ @iosacademy
Join the iOS Academy Community: iosacademy.io/
** Get Skillshare free for 2 Months and learn iOS
www.skillshare.com/r/user/afraz
** Manage all your investments from app earnings on Betterment!
bit.ly/3eBwlI9
** Grow your own KZfaq tech channel with TubeBuddy:
www.tubebuddy.com/iosacademy

Пікірлер: 73
@junglee-bee
@junglee-bee 3 жыл бұрын
Great stuff! Concise, clear, & to-the-point. Thanks :)
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Glad it was helpful!
@vindajojo
@vindajojo 2 жыл бұрын
love it! Keep making more videos!
@iOSAcademy
@iOSAcademy 2 жыл бұрын
Thanks
@devayz9305
@devayz9305 3 жыл бұрын
I love this, thanks!
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Thanks!
@patresito
@patresito 3 жыл бұрын
Finally a good tutorial that is nicely explained and up to date, kudos.
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Thanks!
@mex5341
@mex5341 2 жыл бұрын
Paul Hudson: "ughmmm...."
@sergiobost4891
@sergiobost4891 2 жыл бұрын
Great vid, I now love this pattern
@iOSAcademy
@iOSAcademy 2 жыл бұрын
Thanks!
@glennadams7047
@glennadams7047 3 жыл бұрын
Great intro! I would like to see more on this. Thanks!
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Coming soon!
@sovrinfo
@sovrinfo 2 жыл бұрын
Great video! Thanks a lot.
@iOSAcademy
@iOSAcademy 2 жыл бұрын
Glad you liked it!
@alibek_2001
@alibek_2001 9 ай бұрын
Super. I was just looking for this
@iOSAcademy
@iOSAcademy 9 ай бұрын
Glad I could help
@VijayKumar-me6qd
@VijayKumar-me6qd Жыл бұрын
Very nice and clear explanation 👏👏
@iOSAcademy
@iOSAcademy Жыл бұрын
Thanks!
@bruhhh9791
@bruhhh9791 3 жыл бұрын
You’re the best
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Haha thanks!
@waheedafolabi6929
@waheedafolabi6929 3 жыл бұрын
Thanks Afraz.
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Youre welcome!
@user-mt1mz9og6t
@user-mt1mz9og6t 2 жыл бұрын
Great!!!!
@iOSAcademy
@iOSAcademy 2 жыл бұрын
Thanks
@ViktorMameshyn
@ViktorMameshyn Жыл бұрын
Hey, thanks for the great content! One question - I see that navigation pushes are handled. What if I need to present VC modally - how to handle it better using Coordinator pattern?
@reece5863
@reece5863 Жыл бұрын
Impressive. Very nice.
@iOSAcademy
@iOSAcademy Жыл бұрын
thanks
@smarttravel8839
@smarttravel8839 3 жыл бұрын
hi can you do a video on programmatically create control like textField, textView ,imageview base on json file. This mean json contain the info on what control to create and add all control into a form which can be scroll. Thanks
@Tenly2009
@Tenly2009 3 жыл бұрын
Would have been good to see how the co-ordinator passes model data to/from the VC’s.
@chrismyers5571
@chrismyers5571 3 жыл бұрын
I've personally used the delegate pattern to pass objects around between View Controllers via a coordinator.
@LinkMoody
@LinkMoody 3 жыл бұрын
How it is better than just to define a static function show(from: UIViewController)? Also does it mean that you have to apply this coordinator pattern to all of your controllers in project?
@dzulfikarali2579
@dzulfikarali2579 3 жыл бұрын
Great video mate, would u mind do the mvvm-c as well?
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Sure!
@glennposadas8091
@glennposadas8091 3 жыл бұрын
Hi. Thanks for this! Do you have a public repo for this particular project?
@iOSAcademy
@iOSAcademy 3 жыл бұрын
All code is available for channel members. Its how I keep the content going
@jakubgawecki4264
@jakubgawecki4264 3 жыл бұрын
Hey man, thanks for the video. How would you implement case Event when you do need to pass some parameter in order to initialise our VC?
@anhduong4652
@anhduong4652 3 жыл бұрын
I think you can pass data along with enum parameter. Ex: orderButtonTapped(_ data: String)
@iOSAcademy
@iOSAcademy 2 жыл бұрын
exactly
@sayedgfx
@sayedgfx 3 жыл бұрын
Hey Afraz, I currently have an issue with Xcode where it crashes when I run any of my projects on a phone. Looked it up and tried every solution but nothing seems to fix that, have you encountered this before?
@liangyanyang2091
@liangyanyang2091 3 жыл бұрын
Just great! Thank you for your hard work. Somehow the quality of the video got worse, I mean the resolution got not that sharp as before, I thing when exporting from the video the resolution should be changed
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Thanks and yeah Im experimenting with different recorders
@nurlanakylbekov7266
@nurlanakylbekov7266 3 жыл бұрын
If the project does not require Navigation Controller?
@kalinbalabanov1013
@kalinbalabanov1013 3 жыл бұрын
I haven’t watched the whole video just yet, disclaimer in case you mention it, but a quick note when you import UIKit it automatically imports foundation so importing foundation is redundant
@tokero5199
@tokero5199 Жыл бұрын
Why is this comment on so many swift related videos? Sure it's true, but it also does not really matter, it's not like foundation is imported twice or there is any overhead also it's not the focus of the video.
@kalinbalabanov1013
@kalinbalabanov1013 Жыл бұрын
@@tokero5199 I don’t know man, it was one of my pet peeves 🤣
@myrondulay8628
@myrondulay8628 3 жыл бұрын
Great Course! Thanks a lot. Can you show us a tutorial also how to pass data between controllers using a coordinator? btw I think your audio is too low compared to most of youtube videos out there. Every time I opened your vids your audio for your voice is low. Might want to check that out. Thanks again!
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Thanks, yep newer videos have raised volume
@user-yd9xy3rb4x
@user-yd9xy3rb4x Жыл бұрын
Just send data with the enum in coordinator as associated type, there is not too much to it
@user-yd9xy3rb4x
@user-yd9xy3rb4x Жыл бұрын
read comments there is the exact same answer I've just given
@jakobu3159
@jakobu3159 3 жыл бұрын
Hey! Could you talk about algorithm and how you implement it into a swift project in Xcode? Don’t talk about the fundamentals, just how to implement it please !
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Yep! On my list
@user-yd9xy3rb4x
@user-yd9xy3rb4x Жыл бұрын
lit code man for code wars
@user-yd9xy3rb4x
@user-yd9xy3rb4x Жыл бұрын
Coordinating controllers must have a property by the name of coordinator as a weak reference, mustn't they?
@myrondulay8628
@myrondulay8628 3 жыл бұрын
I noticed that you define var coordinator: Coordinator? some tutorials I've seen that they use weak var coordinator: Coordinator? doesn't yours retain cycle? I tried adding weak but I think the reference was broken and the navigation was not working anymore.
@user-yd9xy3rb4x
@user-yd9xy3rb4x Жыл бұрын
Yeah it should be weak, I noticed that too.
@ekucet
@ekucet 3 жыл бұрын
can i imlement to swiftui peoject this pattern? Would it be correct to use it with SwiftUI?
@dewigesrek5651
@dewigesrek5651 2 жыл бұрын
i personaly dont see the ise of this pattern in swiftUI, it’ll complicate things
@dewigesrek5651
@dewigesrek5651 2 жыл бұрын
but hey, who am i to judgr
@ekucet
@ekucet 2 жыл бұрын
​@@dewigesrek5651 Thank you for your response. I think like you for Coordinator pattern with SwiftUI. Finally, your thoughts are valuable. ;)
@JohnD9271
@JohnD9271 2 жыл бұрын
How to pass the data from one view to another?
@user-yd9xy3rb4x
@user-yd9xy3rb4x Жыл бұрын
Why did you write the same code in both scene delegate and app delegate. I thought the scene delegate along would be enough.
@kaloyako1
@kaloyako1 3 ай бұрын
how to does this work in swiftui?
@1stplace362
@1stplace362 2 жыл бұрын
14:00
@kirillpukhov2004
@kirillpukhov2004 2 жыл бұрын
Why do you always removing Storyboards?
@casadogaspar
@casadogaspar 2 жыл бұрын
Because he's doing the UI programmatically (using code).
@tokero5199
@tokero5199 Жыл бұрын
Because they suck...
@joker_in_the_pack
@joker_in_the_pack 2 жыл бұрын
you could do: let vc = SecondViewController() vc.coordinator = self instead of: var vc: UIViewController & Coordinating = SecondViewController() vc.coordinator = self
@iOSAcademy
@iOSAcademy 2 жыл бұрын
Yep
@kyzmitch2
@kyzmitch2 2 жыл бұрын
Coordinating should be AnyObject, you don't need to make it var
@TheBooban
@TheBooban 3 жыл бұрын
Oh no. Not another pattern. And it's 21 mins too....! What about KVO pattern? Everywhere it says I should know KVO pattern for interviews and at the same time they say nobody uses it.
@BradleyWeston92
@BradleyWeston92 3 жыл бұрын
The coordinator pattern is used a lot in real world projects for apps and apis, it is a good one to learn.
How to use the Coordinator pattern in iOS
18:12
Paul Hudson
Рет қаралды 71 М.
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 16 МЛН
когда повзрослела // EVA mash
00:40
EVA mash
Рет қаралды 4,3 МЛН
Heartwarming: Stranger Saves Puppy from Hot Car #shorts
00:22
Fabiosa Best Lifehacks
Рет қаралды 21 МЛН
I Can't Believe We Did This...
00:38
Stokes Twins
Рет қаралды 95 МЛН
Swift: WebSocket Real-Time Data Introduction (2022, iOS, Xcode 13)
16:08
Debugging in Xcode 13: Tips & Tricks (2022) - iOS
14:02
iOS Academy
Рет қаралды 42 М.
UINavigationController [THE BEST WAY TO USE IT]
38:20
Rebeloper - Rebel Developer
Рет қаралды 8 М.
Memory Leaks in iOS: Find, Diagnose, & Fix (2022)
12:44
iOS Academy
Рет қаралды 47 М.
Why You Should Use The SwiftUI Coordinator Pattern
18:45
Rebeloper - Rebel Developer
Рет қаралды 13 М.
10 Design Patterns Explained in 10 Minutes
11:04
Fireship
Рет қаралды 2,2 МЛН
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 16 МЛН