This video is really great for Jr/beginner devs. A *LOT* of times Jr/beginner devs don't call super when using some kind of base/custom class and then just wonder what went wrong. I can't even count how many times I had to explain this lifecycle to Jr/beginner devs.
@seanallen4 жыл бұрын
I agree, this topic an cause a lot of problems for those developers just starting out.
@gugaemc4 жыл бұрын
Excellent video, Sean. This is the kind of thing every tutorial/course skips (because they're focused on teaching the the app workflow or whatever), but should be basic knowledge for every one.
@seanallen4 жыл бұрын
Thanks Gus!
@VincentGroenewold4 жыл бұрын
Damn nice one! I'm actually quite "far" in Swift now, but this is a thing I always had questions about and forgot to actually find out properly. Thanks! Once again! :)
@seanallen4 жыл бұрын
Happy to help, Vincent 😀
@khushaljhalani4 жыл бұрын
finally.. cleared my Lifecycle concepts :p :) ... really very nicely explained. Great Job bro.
@seanallen4 жыл бұрын
Happy to hear it helped, Khushal 😀
@khushaljhalani4 жыл бұрын
@@seanallen :)
@DatafoxSoftware4 жыл бұрын
Thanks Sean. The last two are interesting.
@seanallen4 жыл бұрын
Happy to help!
@kuralaybiehler56382 жыл бұрын
Thank you! Your explanation of UIViewController Lifecycle so helpful!
@davidsteppenbeck4 жыл бұрын
Great series, Sean! I think a key point worth mentioning for viewDidLayoutSubviews is that it’s **the** place to do anything geometry dependent.
@seanallen4 жыл бұрын
Good note, David 👍
@a4advanture7553 жыл бұрын
loveyouu seannnnnnnnnn what a amazing teacher are you!
@karalis4454 жыл бұрын
Thank you a lot Sean for your work! Even if I'm familiar with most of the topics you cover on your channel I have to say thank you because there are few people out there that explain these things clearly as you do! Keep goin' man!
@seanallen4 жыл бұрын
Thanks Karalis. I definitely plan to keep going!
@martinhassani72663 жыл бұрын
Thank you so much Sean for this incredible video! You are my mentor! :)
@kevinbenavides924 жыл бұрын
Damn good review of the VC lifecycle. Thank you.
@seanallen4 жыл бұрын
Happy to help, Kevin 😀
@mattkruckeberg97984 жыл бұрын
Good stuff man. Jason and I were just talking about this last week.
@seanallen4 жыл бұрын
Thanks Matt!
@JasonMitchellAZ4 жыл бұрын
🤩
@Sparroweatshawk3 жыл бұрын
This is great info. That you for making this video. The only thing I see that is missing, is that you did not mention that if your view isn't using fullscreen, then ViewWillAppear and ViewWillDisappear, will not be called when dismissing the view that has been pushed to the top of the view stack. Cheers.
@prachibile27983 жыл бұрын
I liked this video. I have started learning iOS recently and I was wondering about this one. Nice video :)
@gakkieNL4 жыл бұрын
Great video, nice and short, to the point!
@seanallen4 жыл бұрын
Thanks Gakkie!
@aviadsabag81934 жыл бұрын
Another awesome video Sean! :)
@fatihsumbul76214 жыл бұрын
When I see the that subtitle. I have an idea about lifecycle Why I would like to watch. But When I saw the video of the Sean allen. I should watch regardless of the subject.
@seanallen4 жыл бұрын
I appreciate the support 😀
@RahulPahuja19914 жыл бұрын
much needed sean thanks alot
@valeriiazakharova48864 жыл бұрын
great explanation, thanks
@seanallen4 жыл бұрын
Glad it was helpful!
@VarunParakh4 жыл бұрын
I was asked loadView vs viewDidLoad loadView gets called automatically to load & attach your view to the VC if the view is nil. viewDidLoad gets called once your view finishes loading.
@pallavi61304 жыл бұрын
surprised to see that your very helpful video has only 9607 views
@seanallen4 жыл бұрын
I can't really control the views, but I'm happy to hear you found the video helpful!
@JardaMach4 жыл бұрын
Great video, thank you for it! It's fun to refresh what those methods that we use so automatically do in the background. btw: you have a typo on: 6:38 - calling super.viewDidAppear in viewDidDisappear func. Which is also pretty common mistake b/c those funcs are named so simillarly. Cheers!
@seanallen4 жыл бұрын
Doh... yup, just a simple oversight on that type. Like you said... so common 😀
@VijayParmar-bq2rf4 жыл бұрын
Very Good Explanation of view controllers lifecycle !! I bit confused that why UITableview Delegate and Data source method call 2 or 3 times when it table loads or reload the table.
@seanallen4 жыл бұрын
Thanks Vijay. Glad you liked it. I'd have to dig into your code to answer the second part of your question. Tough to say without seeing what's going on.
@sravk2454 жыл бұрын
Excellent video.
@seanallen4 жыл бұрын
Thanks, Srav
@RahulYadav-im4cl4 жыл бұрын
Very Helpful 🙏🏻
@seanallen4 жыл бұрын
Happy to help!
@demo84demo4 жыл бұрын
Great Video! Thanks
@seanallen4 жыл бұрын
Happy to help, Dave!
@denisg12084 жыл бұрын
Thanks for the video. Does it make sense so put Layout setup in viewWillLayoutSubviews instead of viewDidLoad?
@seanallen4 жыл бұрын
Not unless you need to do anything custom based on when the views bounds change.
@andrevdw7474 жыл бұрын
Hi Sean, just a off topic question. Till now build app in SB. Is it possible to start new project with SwiftUI and move everything over? Thanks!
@conorhoward104 жыл бұрын
Hi Sean / community, does anyone have any examples for when it is better to use viewDidDisapper over viewWillDisappear? Some examples I can find (stopping audio, stopping timers, etc.) seem to be suited for either method. It sounds like the example in the video for viewWillDisappear (saving state of a form) is best suited there because if we were to try that in viewDidDisappear the form will be gone so we can no longer reference it's state. My understanding at the moment is that everything will work in viewWillDisappear so viewDidDisappear seems redundant. Any thoughts?
@monicaluo11224 жыл бұрын
Thank you! Why did you just say viewDidLoad on the subject - I was worried that you would only talk about that func in this video.
@seanallen4 жыл бұрын
Because the title would have been way too long if I listed them all 😀. And view did load is the most searched.
@fredericgomes67574 жыл бұрын
Well explained, 👍
@seanallen4 жыл бұрын
Glad you liked it, Frederic.
@samha15132 жыл бұрын
Devmountain worth it ?
@ramzesenok4 жыл бұрын
Great video, Sean! I’m just wondering: you say viewWill/DidAppear() gets called when the view is added to the view hierarchy. But when you go *back* to the search, why does it trigger this method if the view controller is already there in hierarchy, just behind the top one?
@oscara97094 жыл бұрын
Thank you so much :D just I am a bit confused. When you talk about calling super... I remember that a programmer said that in swift you first initialize all the vars from your current class and then you called super, so in this case you have to call super first because first is going to initialize your vars from your current class? the method from the super class? and my second question, when you talk about the navigation controller it didn't load the view did load again but that was the case only because that is the first scene from the stack of view controllers that the navigation has right? because when using segue or navigation and then going back eliminates that view from memory. Thanks for the video!! and sorry for the looong comment.
@MarvelousLXVII4 жыл бұрын
Great tutorial. Please write a book lol.
@Rohitkumar-xy5jg2 жыл бұрын
Thank you Sean Allen for conceptual video and really that helps me alot. when you override viewDidDisappear function i think in viewDidDisappear function body the method will override super.viewDidDisappear(animated) instead of super.viewDidAppear(animated). Thanks
@multitudes3894 жыл бұрын
Love your .systempink hoodie :)
@seanallen4 жыл бұрын
😂
@Travelicious-Tales5 ай бұрын
Hey! I am a beginner in ios dev and I have a question to ask: What are the methods triggered when the whole app goes to background or gets terminated. I am not asking about life cycle methods but view lifecycle methods. Pls explain in detail or share some material/tutorial link for it if possible 😅
@vamsi38774 жыл бұрын
loadView() will call before viewDidLoad()
@sami7903114 жыл бұрын
Just missing Swift News every Monday :/
@seanallen4 жыл бұрын
Don't give up hope... It may return in some form.
@isaacclark98254 жыл бұрын
Are you still living in the midwest? Have you moved to NC yet?
@seanallen4 жыл бұрын
Not yet. Gonna hang out here for the summer, then move in the fall.
@zaidafzal92084 жыл бұрын
It's very informative video But you please make video on viewdidAppear() , viewWillDissapear (), viewDid Disappear() With real example ?
@mak_whisk3 жыл бұрын
Thank you
@Tenly20093 жыл бұрын
This video should be MANDATORY and REQUIRED viewing before any developer ever creates their first view. There should also be a similar video for TableViews and CollectionViews. If I had seen this before I began developing for iPhone, it would have saved me a year and a half (literally) of head scratching. Although if you’re the type that believes in “magic”, maybe take a pass on this... 😆
@dev_apostle4 жыл бұрын
You must be a smallville fan cause your animated name resembles the intro to that show. And you are wearing red.
@seanallen4 жыл бұрын
Never seen an episode, to be honest.
@wowtheworldchannel4 жыл бұрын
👍🏻
@Zeusevo13 жыл бұрын
Good one. Thumbs up and Sub buddy
@seanallen3 жыл бұрын
Thanks for the support, Zuesevo 😀
@tenminutetokyo26434 жыл бұрын
Oh yeah dood...
@evgenykarkan69394 жыл бұрын
noone noticed that he has forgotten to mention loadView and loadViewIfNeeded
@w0mblemania4 жыл бұрын
It's not necessary to bring up discussion of these methods, or many others. For the vast majority of iOS work, loadView and loadView are not used. Apple even tell us to NOT use them when working with IB.
@seanallen4 жыл бұрын
Well said, w0mbles. I've found that when teaching, often times too much information can be more confusing than helpful. Especially to those early in their learning journey (which is a large portion of my viewers). With my videos, I try to find a balance between giving enough valuable information and not overwhelming the viewer.
@evgenykarkan69394 жыл бұрын
@@w0mblemania `loadView` is an essential part of VC LC, you may be surprised but still in 2020 many developers prefer making UI in code. It's a place where to set a custom view to viewcontroller's view.
@w0mblemania4 жыл бұрын
@@evgenykarkan6939 I write 100% of my iOS UI in code, and have done so for years. 'loadView' is not an essential part of a primer on the UIViewController lifecycle. Instead of picking on Sean for some perceived shortcoming, how about you make a video about UIKit lifecycles, showing us how it's done?
@evgenykarkan69394 жыл бұрын
@@w0mblemania Yes, you can ignore overriding `loadView` if you write your UI code inside `viewDidLoad`. But this is a direct way to a Massive View Controller if so. I'm neither a teacher nor a blogger.
@azsok3 жыл бұрын
nicely explained, thank you. but you know what the names given by apple sucks. android lifecycle method names are much much better.