Yeah, that's what I feel is good with RUclips because I can't tell who the viewer will be. So I like to start basic and figure more advanced people can speed up the video or use the arrow keys to skip ahead in the video. Ha ha, that's what I do anyway, I watch most videos at 2X speed and then slow it down when I get to something I'm not familiar with. 😀
Hey Mark, your content is amazing, this whole series about the reusable popoup and passing data through different ways is so precious! I personally don't use storyboards but you made it so easy to follow along and I actually converted everything you said to a Programmatic approach! If someone would like the source code (only for this video), I'll be glad to share:) Once again Thank you Mark!
Good video. I was watching just to see how you do the pop up, but learned a bunch of cool Storyboard tricks -- refactor to storyboard...who knew!?! I stopped using storyboards a few years back and do things in xibs, so this has been an awesome refresher. And...I gotta say I agree with you about force unwrapping stuff that should definitely be there at runtime. Ok, full disclosure, I unwrap / guard 100% of my optionals...but that's mostly due to brow beating by more senior dev buddies...but your argument is a good one. It's like dropping NSAsserts in your code for things that you WANT to crash during development. Anyway, really enjoyed this. Thanks a million, Mark!
Absolutely agree with "if let" and "!" unwrappers. It's better to know where your app crashes because of nil instead then just let it go. I was glad to hear that someone with pro experience have the same opinion as my.
Ha ha, yeah, I think this opinion has formed a long time ago as a developer. I found sometimes it's better not to have error handling (or nil checking) where something should NEVER have an error or a nil and if it does error, I want to know about it right away and fix it!
Mark, you are one of the best teacher, the way you explain the things is outstanding. i wish if you could make a course on udemy. even though i have started the iOS swift three months ago but haven't learned anything yet to make any practical application. cause the real world programming is really difficult for example data model etc, i wish if you could come up with a course for us. also my most requested course of firestore or firebase would be the dream come true.
Thanks for your feedback, Sam. I appreciate it! I wish I could dedicate more time to making these tutorials but it's hard enough to come out with a video a week sometimes! I got a lot going on. I have a new series I've been working on that you might be interested in. It's the "Itinerary App Series". Only about 10 videos into it but it'll probably be 30 by the time I'm done.
Great advise on the theory of why there are instances where unwrapping does not help you to debug your code. I've learned more than one thing today so it's an awesome day.
Awesome video Mark! After watching this part, I immediately applied it on one of our company projects. Saved me a lot of time copying and pasting everything lol! Thanks! Looking forward to your new videos.
Hi Mark, probably the best and easy to understand tutorials for a beginner like me! You should make an udemy course or something like that! Really great work explaining and teaching! Thank you, keep up the awesome work man!
That's awesome, I'm glad you liked it. I always try to keep the beginner in mind and explain everything in case the person is new. I figured if they are advanced they can watch the video at 2X speed. I totally keep thinking about a Udemy course. I will have to come up with a course outline. 😄
Hi Mark, thanks for this great video! I agree with "don't always write safe code". But I also curious about when will you use "if let". Can you talk more about that? Thanks a lot!
You mentioned that you like to have just one ViewController per storyboard, is there any particular reason you like to have it that way? I'm just curious about your reasoning since I'm somewhat new to programming.
Yeah, for a couple of reasons: 1. Xcode performance reasons. The more view controllers you add to the storyboard the less performant (more memory used) Xcode becomes. You'll notice performance degrades. 2. Less conflicts when working on teams If you're working on a team and 3 of your devs are all working on the same storyboard (on 3 different view controllers) then it's REALLY hard to merge in all 3 changes. There will be MANY merge conflicts. If you're working solo, this won't be a problem. Hope this helps!
Also, it would add a lot if we change the transition style for the date popup into 'Cross Dissolve', it would make it more user friendly :) Thanks for the awesome presentation, keep it up
Great tut, Mike. If you wanted to make a reusable view controller to display a message to the user from anywhere in the app, how would you do it without creating segues from all view controllers to the custom pop up? Thanks!
Hey, McLovin, In my latest series (Itinerary App Series) I do this with some of the screens. You want to basically instantiate your reusable viewcontroller and then call present it. Something like this will do: let storyboard = UIStoryboard(name: "ReusablePopupViewController", bundle: nil) let vc = storyboard.instantiateInitialViewController()! present(vc, animated: true)
Hi Mark, I'm new to iOS and Swift programming, so I find very helpful all your videos. I have a questions. It is possible to call the popup without any segue? Like if it were a message with OK or Cancel options. Thank you and keep the good work!!
Hey mark I’ve been trying to figure out for a long time now how to move navigation bars, and have views on top of a navigation bar layer. So like if I were to have a side popout menu, how could I have it on top of the navigation bar layer when the menu opens and also how could u move the navigation bar over for example if I were to want the nav bar to slide to the right or left when the menu opens. I’m not sure if that made since or not if not I would be glad to clarify. You don’t have to respond I was just thinking it could be a good video for your navigation bar series you are doing. I know I would learn a lot from it. Also i Love the fresh new content. Glad your back to the RUclips game
Hi Mark, great videos and content. Do you have any advice for someone who is self-taught iOS programming and trying to get a Junior iOS Developer position in the near future?
Hello! Well, as someone who has hired a lot of developers in the past I can tell you that the only thing I'm looking for is someone who can do the job. It doesn't matter if you are self-taught or have the best or most expensive education. No amount of school can guarantee the individual will be a good developer. So what I'm looking for is someone that can do the job (and get along with the rest of the team). It's that simple. So what you need to do is prove to future employers that you can do the job with something on your resume. You can do this by collaborating with some friends on an app,, creating your own app and putting it on the App Store or maybe talk to your current employer and convince them to allow you to build an app for them. Maybe you will have to build it after work hours but at least you can put that on your resume.
Hey Mark, great video. I was thinking about the force unwrapping at the end and I think is a good idea of the optional chaining (maybe with guard statement to avoid the identation) and call the fatalError function to crash with elegance and show to appropied message
@Mark It is simply a function that is guaranteed to never return. It will unconditionally print a message and stop/crash your program. In my opinion, it is better to force unwrap it in this case; the auto-generated error message is good enough. fatalError() certainly has its place.
Hi Mark, great video. This is the first time I've seen storyboard reference used so I learned something new again. Thank you. I do have some questions though. 1. When would it be ideal to use storyboard ref? Im thinking your selectTime storyboard could have been included in the main storyboard. What is the advantage of separating it? 2. From what I have learned in segues, its best practice to always have an identifer. Just wondering if that's true or not because you didnt use any here and it still worked. 3. For opening the VC via code, how come you didnt use a storyboard ID? That's another thing that was taught to me and wondering if its needed and when its needed? Is it because it is the initial view controller so we dont need to instantiate it and call the storyboard ID? Thank you so much!
I'm glad you liked the video! Let me see if I can answer your questions. You have some great questions by the way. 1. a. When you get a lot of scenes on one storyboard your Xcode will start to slow down. So fewer scenes equals better performance when developing. b. Also if you are working on a team it can make it tough to figure out which storyboard has the scene you or your team member is looking for. So if you name your storyboards and view controllers the same name, it makes it super simple to find things. Like: LoginViewController.storyboard and LoginViewController.swift. Easy! c. Say you are on a team. Two developers work on the same storyboard (one file) and commit it. When they merge that storyboard they could have conflicts which can be pretty difficult to resolve. Having the scenes in separate storyboards reduces this problem. 2. Segue Identifiers are totally optional but in the next video (ruclips.net/video/gZHB0nPYIJE/видео.html) you will see where an identifier comes in handy. 3. I would have had to use a storyboard ID if that popup was not the initial view controller. Since it was the initial view controller then iOS knows which view controller I want. In this case there will only be one view controller on that storyboard so I know that it will ALWAYS be the initial view controller. There's no chance it would change and the code would break in the future. Hope this makes sense. :)
Hello Mark. Thanks for the tutorial. I'm a newbie and your approach is very clear and simple as compared to the other videos. Other videos just want to showcase how smart they are not taking into consideration of the basics in app development. :) A question on segues, how do you create segues where the "Animates" checkbox is not checked by default. Or is there a trick where you configure a View Controller, when called to load, will not animate? Perhaps a similar approach to your technique where you configure the View Controller Presentation setting to Over Current Context and not on each segue. Thanks.
Thanks, Tom! Regarding your question, are you talking about when you want to perform the segue in code and you don't want the animation? Because it sounds like you know how to do it inside the interface builder's attribute inspector (unchecking the animation checkbox manually). From what I can tell, it looks like there's no actual property for "Animates" in the attribute inspector. Instead it looks like you have to create a custom subclass of the UIStoryboardSegue and when navigating set false for animation (stackoverflow.com/questions/16209113/push-segue-in-xcode-with-no-animation). Example: import UIKit /// Present the next screen without an animation. class ModalNoAnimationSegue: UIStoryboardSegue { override func perform() { self.sourceViewController.presentViewController( self.destinationViewController as! UIViewController, animated: false) } }
Hi Surjeet, I haven't used a nib for a popup but that's an interesting idea. I have a couple videos where I display a view inside a VC for a popup: UIView as Popup: ruclips.net/video/k-GvIqh5Xcs/видео.html UIView in Scene Dock: ruclips.net/video/WnlPZbSnlLI/видео.html And Brian Advent has a video on displaying a nib in your VC: ruclips.net/video/tvQxXoV527w/видео.htmlm46s
Hi Mark, I purchased your Swift UI Mastery book. I have a problem with a xib and layout and constraints. I have 6 labels and 6 images I want to display as the result of the query from data in firestore database and storage. I have all the data getting to the xib to display, but cannot figure out why I cannot lay all the fields out to get them to display correctly? Do you have any videos or lessons I could access to help me solve this layout issue? Thanks Chris
Thanks for the great video. One question, how would I get the popup to slide in from the side instead of from the bottom. I'm really trying to create a slide in menu like in one of your other videos, but I need it to be in a separate viewController, so that it is reusable throughout my app. Thanks for any help or suggestions in advanced.
You're welcome, Jonathan. Unfortunately there's no easy way to do it. Xcode doesn't provide us with a transition for it to come in through the side, just up from the bottom (default). I have some ideas though you could try. Sliding in from the side is the default animation when using a Navigation Controller. So you might want to look into using a Navigation Controller but hide the nav bar on top. My other idea would be to build a custom transition using UIViewControllerAnimatedTransitioning. This is a bit more advanced. I'll probably be teaching this topic in a future video for the Itinerary App Series I'm currently in the middle of. But that could be a few weeks off still.
Hi Mark, I'm having a very strange issue(s). The first being, when I go to segue by tapping the button, the tab bar turns white and that's it. I can't see or interact with any part of the pop up View. The second is I have a Theme class set, so my app can alternate in between dark and light mode. Whenever I go to specify what items on the popup view should be governed by the Theme class (which I do the exact same way as all the other view controllers) my app always crashes. Running Swift 4.2 on Xcode 10
Hi , Am not able to refactor the popup UIViewcontroller to a different storyboard. When i select UIViewController and then Editor->Refactor to storyboard a copy of the new storybaord is created in Base.Iproj but i dont see that in the left hand project navigation in Xcode and the UIviewcontroller is still showing in the Main.storyboard. Any help appreciated. Thanks!
But I don't think it's a good idea to show the grey background of the pob up view controller vertically. Can you just make it appear gradually like fade in or something like that where the pop up still be shown vertically. Is that possible ?
It certainly is possible and in my test project I had it set that way but forgot to apply it while recording the new project. Here is what you do: 1. Open the popup view controller in the storyboard and select it. 2. In the Attributes Inspector pane there is a property called "Transition Style". Change it to "Cross Dissolve". That should do it!
I have done it before, a container view can have it's own view controller and everything, and has lots of customization! Also, you can have it show in multiple views, showing the same content everywhere.
i need to do the same what you did for the date picker but not when the user press the button. i have a beacon so when the user enter the area he will see a pop up i made that in the code : let storyBoard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil) let QuestionViewController = storyBoard.instantiateViewController(withIdentifier: "Questionscene") as! QuestionViewController self.present(QuestionViewController, animated: true, completion: nil) and it works fine except the background i couldn't make it (over current context ) do you know how can i do that?
Hi Ignacio, unfortunately I don't know of a book for coding UI. ☹️ But you might be interested in my colleague's RUclips channel where he specializes in coding UI. His name is Brian Vong and his channel is here: ruclips.net/channel/UCuP2vJ6kRutQBfRmdcI92mAfeatured
I get this question a lot. And I've been down both roads. I started leaving storyboards and I found out it was because there were things I just didn't want to take the time to learn. So instead I set out to clear up those questions or recurring problems I had with layout, merge conflicts, size classes, etc. And I did answer all of them and now I feel no need to abandon storyboards. Quite the opposite happened, now I love storyboards and got so good at them I can prototype with ease and speed. The honest truth was I was just too lazy to find out answers at first! But realizing my own shortcomings I figured others must have these problems too. So my shortcomings became a source of topics for videos! I found this to be the case with two of my coworkers as well. They were running into problems with storyboards and wanted to abandon them. So I sat with each individually and found out the exact reason why they wanted to abandon them and in each case there were only about 2 very specific problems or things they didn't know or understand. We cleared it up and they've never had a problem since. So when someone suggests to you to move away from storyboards they may have been suffering from some problem that I and my coworkers had suffered from too. Ask them specifically what it is they don't like or don't know about storyboards and you might be able to help them out! I created a lot of tutorials with storyboard tips and try to lend insight when common problems come up in my videos. I also LOVE this article of how this one developer works with storyboards too: medium.cobeisfresh.com/a-case-for-using-storyboards-on-ios-3bbe69efbdf4 I plan on using some of his tips in my current series I'm recording. I hope this helps! Feel free to share any problems or uncertainties or things they don't understand. I would love to help out my fellow developers! We're a small community and it's good to lend everyone a hand now and then.
Oh man, popups are tough when it comes to landscape. We struggle with this at work. Especially on the iPhone SE. It's worse when you need to see the keyboard and the popup at the same time. Eventually we just lock portrait for popups as landscape didn't give our users a good experience and they would just turn the phone to portrait anyway.
Hi Mark Great video thanks...I have a question, I have created a UICollectionViewController which includes a nested collectionView (one collection view in the cell of another!) in code and would like to present a popUp when the user clicks a cell of the nested collectionView, in CollectionView didSelectItemAt but unfortunately a UICollectionViewCell class does contain the present(viewControlerToPresent:...) method. Any ideas how I could present popup other than re-creating the collectionView in a storyboard and using perform(segue)?
thanks for let me lean so much from your video! And i have an question for you here. I create and clean new project with single view by swif4. there is only one button in first view , and i hope to present another view by touch this button. i written the code like: let todovc = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "TodoViewController") ,,, then when i type the code: self.persent(... Xcode didn't give me any tips but an error : Value of type 'ViewController' has no member 'persent'... I free very confus because from your video, UIViewController do have method called 'persent', right? Holp can have your reply! Thanks again!
@@bigmtnstudio Well, it's not _that_ much. Looks like it's $30/mo (not sure if that's access to the entire library, though). Still, though, their videos strike me as a little dry and uninspired. What I think puts your videos a few notches above theirs are: the pacing is higher, you show a few different ways to accomplish something, you do these little 1-2 minute tangents (where you go "Oh, you guys want to see something neat?". For someone short-attention-span like myself, those little digressions give my brain break from the main topic of the video), and, most importantly, you show the quick ways to give your app _really_ slick effects (I'm thinking of the Tinder-like card swiping. The ease with which you made the animated slide-up sharing menu is the kind of stuff that makes someone one of those fabled "10x" programmers).
you are really amazing sir , i am from india , i have already youtube channel , i started my youtube channel to teach poor student that can't afford online Bootcamp and online course , please sir ,you have a great knowledge please teach us any complete project from sketch (form idea to complete app to publish apple app store) ,you have a great knowledge , and you know how to share knowledge, please teach us........
Thank you! I am in a middle of a series right now that starts from the very beginning of app development. You can find it here: ruclips.net/p/PLHDMmeIMXj8UV9xqF7Mr2Puh8xehDCy-O
Video is called “Reusable Custom Popups” so I don’t get why it spends a minute saying “you could also do it this way” and demonstrating a non-reusable pop up. I think it would be a better video if that irrelevant tangent was completely cut out. In general, I don’t like instructional videos that spend too much time discussing/demonstrating the wrong way to do things. I do prefer your videos to most others - so this comment is meant to be constructive. Thank you for making all these videos.
Mark Moeykens Do you do any private tutoring? I have an app I’ve been working on (as a hobby mostly) for about a year now. It’s a utility of sorts that I’ve shared with about 8 people. The app works, and they all love it - but I’m not happy with it and want to re-write parts of it. Specifically, I have 2 custom views that I reuse throughout the app but I’m pretty sure I made some rookie mistake when I created them - or when I try to use them - because I often have to do all kinds of stupid little things to make them render properly in collection views, table views, etc... If your time is not too expensive, I’d like you to take a look at how I’ve built the custom UIView and explain to me where I went wrong and ideally how to fix it... or, in lieu of payment, maybe you could use this exercise as the subject of a future video tutorial...? Oh yeah - I don’t use storyboards, so it’s all stored in 2 .swift files.
Hey Mark. I LOVE they way you explain code and how you don’t expect your viewers to know the basics. This helps so much! Keep them coming please!
Yeah, that's what I feel is good with RUclips because I can't tell who the viewer will be. So I like to start basic and figure more advanced people can speed up the video or use the arrow keys to skip ahead in the video. Ha ha, that's what I do anyway, I watch most videos at 2X speed and then slow it down when I get to something I'm not familiar with. 😀
Yes, seriously! You should consider making a course. I would buy it! You explain so well! Anyway, thanks and I hope you're have a great week!
Thank you Mark. Love the way you present the tutorial. You make your presentation so easy to follow. Great Job!!!
No problem, Hamzah! Glad you liked it. 😃
Hey Mark, your content is amazing, this whole series about the reusable popoup and passing data through different ways is so precious! I personally don't use storyboards but you made it so easy to follow along and I actually converted everything you said to a Programmatic approach! If someone would like the source code (only for this video), I'll be glad to share:)
Once again Thank you Mark!
Thanks, Serxhio, that means a lot to me.
Good video. I was watching just to see how you do the pop up, but learned a bunch of cool Storyboard tricks -- refactor to storyboard...who knew!?! I stopped using storyboards a few years back and do things in xibs, so this has been an awesome refresher. And...I gotta say I agree with you about force unwrapping stuff that should definitely be there at runtime. Ok, full disclosure, I unwrap / guard 100% of my optionals...but that's mostly due to brow beating by more senior dev buddies...but your argument is a good one. It's like dropping NSAsserts in your code for things that you WANT to crash during development. Anyway, really enjoyed this. Thanks a million, Mark!
I wish I found you when I started this endeavor. This is easily the best tut on Apple dev I've seen so far.
GREAT JOB!!
Wow, thanks, Marl! I'm glad my videos help! 😃 👍
Absolutely agree with "if let" and "!" unwrappers. It's better to know where your app crashes because of nil instead then just let it go. I was glad to hear that someone with pro experience have the same opinion as my.
Ha ha, yeah, I think this opinion has formed a long time ago as a developer. I found sometimes it's better not to have error handling (or nil checking) where something should NEVER have an error or a nil and if it does error, I want to know about it right away and fix it!
Mark, you are one of the best teacher, the way you explain the things is outstanding. i wish if you could make a course on udemy.
even though i have started the iOS swift three months ago but haven't learned anything yet to make any practical application.
cause the real world programming is really difficult for example data model etc, i wish if you could come up with a course for us.
also my most requested course of firestore or firebase would be the dream come true.
Thanks for your feedback, Sam. I appreciate it! I wish I could dedicate more time to making these tutorials but it's hard enough to come out with a video a week sometimes! I got a lot going on. I have a new series I've been working on that you might be interested in. It's the "Itinerary App Series". Only about 10 videos into it but it'll probably be 30 by the time I'm done.
Thanks Mark. Not for the demo only but the programming tips
You're welcome, Seesi. 👍🏼
Great advise on the theory of why there are instances where unwrapping does not help you to debug your code. I've learned more than one thing today so it's an awesome day.
Ha ha, glad to hear it! 🙌
Awesome video Mark! After watching this part, I immediately applied it on one of our company projects. Saved me a lot of time copying and pasting everything lol! Thanks! Looking forward to your new videos.
That's so awesome, Mark! Glad the tutorial helped!
Great content! Thank you so much!
You're welcome!
Thank you for the videos and the coverage. I watched many videos and tutorials. No one has explained so detailed.
Oh wow, well thank you so much, Satish! 👍
Great tutorial. Love the "one more thing" tips
Hi Mark, probably the best and easy to understand tutorials for a beginner like me!
You should make an udemy course or something like that! Really great work explaining and teaching!
Thank you, keep up the awesome work man!
That's awesome, I'm glad you liked it. I always try to keep the beginner in mind and explain everything in case the person is new. I figured if they are advanced they can watch the video at 2X speed. I totally keep thinking about a Udemy course. I will have to come up with a course outline. 😄
Neatly explained the storyboard reference
Thank you, Manjula. I'm glad you liked it. 😀
Absolutely Beautiful! And I was just looking at Reusability patterns myself, Well done, keep it up Mr. Moeykens!
Thank you, Mr. Kenobi!
No, Thank You!
The best tutorial on popups !, You're the best!
Thank you very much!!!
Ha ha, you're welcome! Hope you are learning a lot. 👍😀✊
This video really helped me! Thanks a lot (:
You're welcome! Glad it could be of use so many years later. 😃
Hi Mark
Great video, I am trying to do the same with a pop up TableView, do you have any tutorials that cover a tableview in more detail? Perhaps.
I just love this video. There is so much information provided. Thank you Mark.
You're welcome, Josh. Glad you liked it!
Hi Mark, thanks for this great video!
I agree with "don't always write safe code". But I also curious about when will you use "if let". Can you talk more about that? Thanks a lot!
your channel is Greeeeaaat ! thank you so muuch for time that spend teaching us.
You're welcome, Alireza. It's my pleasure.
Ok c mmm nnjk k k k I
Excellent video with nice presentation.
Thank you, Vipul!
Mark Moeykens Please make video on size classes , you are best teacher
Thank you Mark.. great video! That's exactly what I was looking for!
That's great, Martin. Glad I could help!
Thanks Mark. I just have learned something completely new for me in Swift.
That's awesome, Raimonds!
Hi Mark, you are the best teacher I have in youtube.Thanks for the time you spend making then.They inspire me so much.Best regards from Portugal
Hello, Portugal! Thanks, Hugo. I'm glad you like my videos. 🙂
You mentioned that you like to have just one ViewController per storyboard, is there any particular reason you like to have it that way? I'm just curious about your reasoning since I'm somewhat new to programming.
Yeah, for a couple of reasons:
1. Xcode performance reasons.
The more view controllers you add to the storyboard the less performant (more memory used) Xcode becomes. You'll notice performance degrades.
2. Less conflicts when working on teams
If you're working on a team and 3 of your devs are all working on the same storyboard (on 3 different view controllers) then it's REALLY hard to merge in all 3 changes. There will be MANY merge conflicts.
If you're working solo, this won't be a problem.
Hope this helps!
@@bigmtnstudio I like the idea of having storyboard references since the Storyboard links seem to break now and again.
Also, it would add a lot if we change the transition style for the date popup into 'Cross Dissolve', it would make it more user friendly :)
Thanks for the awesome presentation, keep it up
Yeah, I like that transition as well. Thanks!
Great tut, Mike. If you wanted to make a reusable view controller to display a message to the user from anywhere in the app, how would you do it without creating segues from all view controllers to the custom pop up? Thanks!
Hey, McLovin, In my latest series (Itinerary App Series) I do this with some of the screens. You want to basically instantiate your reusable viewcontroller and then call present it.
Something like this will do:
let storyboard = UIStoryboard(name: "ReusablePopupViewController", bundle: nil)
let vc = storyboard.instantiateInitialViewController()!
present(vc, animated: true)
Love this series so far! Great explanation!
Thank you! Hope you like the rest. :)
Hi Mark,
I'm new to iOS and Swift programming, so I find very helpful all your videos.
I have a questions. It is possible to call the popup without any segue? Like if it were a message with OK or Cancel options.
Thank you and keep the good work!!
Yes, Amanda, I show how to do this later in the video. Take a look around 21:25 to see the code. That code does not use a segue.
Hey mark I’ve been trying to figure out for a long time now how to move navigation bars, and have views on top of a navigation bar layer. So like if I were to have a side popout menu, how could I have it on top of the navigation bar layer when the menu opens and also how could u move the navigation bar over for example if I were to want the nav bar to slide to the right or left when the menu opens. I’m not sure if that made since or not if not I would be glad to clarify. You don’t have to respond I was just thinking it could be a good video for your navigation bar series you are doing. I know I would learn a lot from it. Also i Love the fresh new content. Glad your back to the RUclips game
Very well done!
Hi Mark, great videos and content. Do you have any advice for someone who is self-taught iOS programming and trying to get a Junior iOS Developer position in the near future?
Hello! Well, as someone who has hired a lot of developers in the past I can tell you that the only thing I'm looking for is someone who can do the job. It doesn't matter if you are self-taught or have the best or most expensive education. No amount of school can guarantee the individual will be a good developer. So what I'm looking for is someone that can do the job (and get along with the rest of the team). It's that simple. So what you need to do is prove to future employers that you can do the job with something on your resume. You can do this by collaborating with some friends on an app,, creating your own app and putting it on the App Store or maybe talk to your current employer and convince them to allow you to build an app for them. Maybe you will have to build it after work hours but at least you can put that on your resume.
Hey Mark, great video. I was thinking about the force unwrapping at the end and I think is a good idea of the optional chaining (maybe with guard statement to avoid the identation) and call the fatalError function to crash with elegance and show to appropied message
Hey Carlos, I'm not familiar with the fatalError function. What is that?
@Mark It is simply a function that is guaranteed to never return. It will unconditionally print a message and stop/crash your program. In my opinion, it is better to force unwrap it in this case; the auto-generated error message is good enough. fatalError() certainly has its place.
Great video, learned a lot! Thanks!
Awesome, I'm glad. 😃
Hi Mark, great video. This is the first time I've seen storyboard reference used so I learned something new again. Thank you. I do have some questions though.
1. When would it be ideal to use storyboard ref? Im thinking your selectTime storyboard could have been included in the main storyboard. What is the advantage of separating it?
2. From what I have learned in segues, its best practice to always have an identifer. Just wondering if that's true or not because you didnt use any here and it still worked.
3. For opening the VC via code, how come you didnt use a storyboard ID? That's another thing that was taught to me and wondering if its needed and when its needed? Is it because it is the initial view controller so we dont need to instantiate it and call the storyboard ID?
Thank you so much!
I'm glad you liked the video! Let me see if I can answer your questions. You have some great questions by the way.
1.
a. When you get a lot of scenes on one storyboard your Xcode will start to slow down. So fewer scenes equals better performance when developing.
b. Also if you are working on a team it can make it tough to figure out which storyboard has the scene you or your team member is looking for. So if you name your storyboards and view controllers the same name, it makes it super simple to find things. Like: LoginViewController.storyboard and LoginViewController.swift. Easy!
c. Say you are on a team. Two developers work on the same storyboard (one file) and commit it. When they merge that storyboard they could have conflicts which can be pretty difficult to resolve. Having the scenes in separate storyboards reduces this problem.
2. Segue Identifiers are totally optional but in the next video (ruclips.net/video/gZHB0nPYIJE/видео.html) you will see where an identifier comes in handy.
3. I would have had to use a storyboard ID if that popup was not the initial view controller. Since it was the initial view controller then iOS knows which view controller I want. In this case there will only be one view controller on that storyboard so I know that it will ALWAYS be the initial view controller. There's no chance it would change and the code would break in the future.
Hope this makes sense. :)
Hello Mark. Thanks for the tutorial. I'm a newbie and your approach is very clear and simple as compared to the other videos. Other videos just want to showcase how smart they are not taking into consideration of the basics in app development. :)
A question on segues, how do you create segues where the "Animates" checkbox is not checked by default. Or is there a trick where you configure a View Controller, when called to load, will not animate?
Perhaps a similar approach to your technique where you configure the View Controller Presentation setting to Over Current Context and not on each segue.
Thanks.
Thanks, Tom!
Regarding your question, are you talking about when you want to perform the segue in code and you don't want the animation? Because it sounds like you know how to do it inside the interface builder's attribute inspector (unchecking the animation checkbox manually).
From what I can tell, it looks like there's no actual property for "Animates" in the attribute inspector. Instead it looks like you have to create a custom subclass of the UIStoryboardSegue and when navigating set false for animation (stackoverflow.com/questions/16209113/push-segue-in-xcode-with-no-animation).
Example:
import UIKit
/// Present the next screen without an animation.
class ModalNoAnimationSegue: UIStoryboardSegue {
override func perform() {
self.sourceViewController.presentViewController(
self.destinationViewController as! UIViewController, animated: false)
}
}
Lovely video! Keep it up!
Thanks, Muhammed 😀
Hi Mark, really liked you tutorial. I have a question . How to create popover from nib or without using storyboard ?
Hi Surjeet, I haven't used a nib for a popup but that's an interesting idea. I have a couple videos where I display a view inside a VC for a popup:
UIView as Popup: ruclips.net/video/k-GvIqh5Xcs/видео.html
UIView in Scene Dock: ruclips.net/video/WnlPZbSnlLI/видео.html
And Brian Advent has a video on displaying a nib in your VC: ruclips.net/video/tvQxXoV527w/видео.htmlm46s
Nice tutorial, thanks a lot. I will subscribe you, and hope you will continue your great works! All the best.
Thanks, Kaiser! I just recorded another 3 videos last night. So you should start seeing more coming out soon.
Very good Tutorial! Thank you
Thanks, Selcuk!
Hi Mark, I purchased your Swift UI Mastery book. I have a problem with a xib and layout and constraints. I have 6 labels and 6 images I want to display as the result of the query from data in firestore database and storage. I have all the data getting to the xib to display, but cannot figure out why I cannot lay all the fields out to get them to display correctly? Do you have any videos or lessons I could access to help me solve this layout issue?
Thanks
Chris
Thanks for the great video. One question, how would I get the popup to slide in from the side instead of from the bottom. I'm really trying to create a slide in menu like in one of your other videos, but I need it to be in a separate viewController, so that it is reusable throughout my app. Thanks for any help or suggestions in advanced.
You're welcome, Jonathan. Unfortunately there's no easy way to do it. Xcode doesn't provide us with a transition for it to come in through the side, just up from the bottom (default). I have some ideas though you could try. Sliding in from the side is the default animation when using a Navigation Controller. So you might want to look into using a Navigation Controller but hide the nav bar on top. My other idea would be to build a custom transition using UIViewControllerAnimatedTransitioning. This is a bit more advanced. I'll probably be teaching this topic in a future video for the Itinerary App Series I'm currently in the middle of. But that could be a few weeks off still.
Mark Moeykens Great thanks for the ideas, I'll research those ideas. Also I'll will be on the lookout for you upcoming videos. Keep up the good work.
This was very good. Thank you.
Thanks! I'm glad you liked it. 😀
Thanks for the tutorial. Do you know how can I do this using a .xib file?
Hi Mark, I'm having a very strange issue(s). The first being, when I go to segue by tapping the button, the tab bar turns white and that's it. I can't see or interact with any part of the pop up View. The second is I have a Theme class set, so my app can alternate in between dark and light mode. Whenever I go to specify what items on the popup view should be governed by the Theme class (which I do the exact same way as all the other view controllers) my app always crashes. Running Swift 4.2 on Xcode 10
Hi , Am not able to refactor the popup UIViewcontroller to a different storyboard. When i select UIViewController and then Editor->Refactor to storyboard a copy of the new storybaord is created in Base.Iproj but i dont see that in the left hand project navigation in Xcode and the UIviewcontroller is still showing in the Main.storyboard. Any help appreciated. Thanks!
But I don't think it's a good idea to show the grey background of the pob up view controller vertically. Can you just make it appear gradually like fade in or something like that where the pop up still be shown vertically. Is that possible ?
It certainly is possible and in my test project I had it set that way but forgot to apply it while recording the new project. Here is what you do:
1. Open the popup view controller in the storyboard and select it.
2. In the Attributes Inspector pane there is a property called "Transition Style". Change it to "Cross Dissolve".
That should do it!
Mark Moeykens thank you so much
You're welcome!
Very good video, but couldn't one just use a container view (with a view controller) and reuse the view in there?
You know, I never thought of using the container view for a popup. I don't see why that wouldn't work. Interesting idea!
I have done it before, a container view can have it's own view controller and everything, and has lots of customization! Also, you can have it show in multiple views, showing the same content everywhere.
i need to do the same what you did for the date picker but not when the user press the button. i have a beacon so when the user enter the area he will see a pop up
i made that in the code :
let storyBoard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let QuestionViewController = storyBoard.instantiateViewController(withIdentifier: "Questionscene") as! QuestionViewController
self.present(QuestionViewController, animated: true, completion: nil)
and it works fine except the background i couldn't make it (over current context )
do you know how can i do that?
Can you please recommend me a custom UI Book without using Interface Builder?
Hi Ignacio, unfortunately I don't know of a book for coding UI. ☹️ But you might be interested in my colleague's RUclips channel where he specializes in coding UI. His name is Brian Vong and his channel is here: ruclips.net/channel/UCuP2vJ6kRutQBfRmdcI92mAfeatured
amazing man!!! thanks
Oh good, you watched it! Hope this series is helpful.
yo, alot of other people telling me to move away from storyboards and do everything in code. what is your thoughts? thanks.
I get this question a lot. And I've been down both roads. I started leaving storyboards and I found out it was because there were things I just didn't want to take the time to learn. So instead I set out to clear up those questions or recurring problems I had with layout, merge conflicts, size classes, etc. And I did answer all of them and now I feel no need to abandon storyboards. Quite the opposite happened, now I love storyboards and got so good at them I can prototype with ease and speed.
The honest truth was I was just too lazy to find out answers at first! But realizing my own shortcomings I figured others must have these problems too. So my shortcomings became a source of topics for videos!
I found this to be the case with two of my coworkers as well. They were running into problems with storyboards and wanted to abandon them. So I sat with each individually and found out the exact reason why they wanted to abandon them and in each case there were only about 2 very specific problems or things they didn't know or understand. We cleared it up and they've never had a problem since.
So when someone suggests to you to move away from storyboards they may have been suffering from some problem that I and my coworkers had suffered from too. Ask them specifically what it is they don't like or don't know about storyboards and you might be able to help them out! I created a lot of tutorials with storyboard tips and try to lend insight when common problems come up in my videos.
I also LOVE this article of how this one developer works with storyboards too: medium.cobeisfresh.com/a-case-for-using-storyboards-on-ios-3bbe69efbdf4
I plan on using some of his tips in my current series I'm recording.
I hope this helps! Feel free to share any problems or uncertainties or things they don't understand. I would love to help out my fellow developers! We're a small community and it's good to lend everyone a hand now and then.
hi! that about landscape, how to manage popup height then ?
Oh man, popups are tough when it comes to landscape. We struggle with this at work. Especially on the iPhone SE. It's worse when you need to see the keyboard and the popup at the same time. Eventually we just lock portrait for popups as landscape didn't give our users a good experience and they would just turn the phone to portrait anyway.
is it possible to (adjust segue maybe) show another fullscreen viewcontroller for landscape?
Hi Mark
Great video thanks...I have a question, I have created a UICollectionViewController which includes a nested collectionView (one collection view in the cell of another!) in code and would like to present a popUp when the user clicks a cell of the nested collectionView, in CollectionView didSelectItemAt but unfortunately a UICollectionViewCell class does contain the present(viewControlerToPresent:...) method. Any ideas how I could present popup other than re-creating the collectionView in a storyboard and using perform(segue)?
Figured out the solution, used delegate/protocol pattern to get the viewController to call present(popup)...works perfectly
Great video! But you could definitely make it smaller!
Thanks! Yeah, I know what you mean! Sometimes I describe things too much!
Mark Moeykens :-)
plz tell me how can I download iOS books
Hi Asad, all the links are in the video description. ✌️
Hi Mark really your videos are awesome, if you can please upload code in GitHub. its more helpful
another Awesome Video :)
Thanks for watching, Rajat. ✊🏼
thanks for let me lean so much from your video! And i have an question for you here. I create and clean new project with single view by swif4. there is only one button in first view , and i hope to present another view by touch this button. i written the code like: let todovc = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "TodoViewController") ,,, then when i type the code: self.persent(... Xcode didn't give me any tips but an error : Value of type 'ViewController' has no member 'persent'... I free very confus because from your video, UIViewController do have method called 'persent', right? Holp can have your reply! Thanks again!
Great stuff!
Rylan, did you even watch the whole video? I just made this public! Ha ha ha, I'm just giving you a hard time, man. 😂
Haha. For the record. I left that comment 5 minutes into the video! I watch all your stuff all the way through! 😃
How to let it dismiss by click any part outside it?
I usually use a button that fills the screen. Here's an example from another series: ruclips.net/video/DmWv-JtQH4Q/видео.htmlm55s
On Lynda.com, this bit of learning would take 3 hours and cost $50.
Wow! I didn't realize how much that costs!
@@bigmtnstudio Well, it's not _that_ much. Looks like it's $30/mo (not sure if that's access to the entire library, though). Still, though, their videos strike me as a little dry and uninspired. What I think puts your videos a few notches above theirs are: the pacing is higher, you show a few different ways to accomplish something, you do these little 1-2 minute tangents (where you go "Oh, you guys want to see something neat?". For someone short-attention-span like myself, those little digressions give my brain break from the main topic of the video), and, most importantly, you show the quick ways to give your app _really_ slick effects (I'm thinking of the Tinder-like card swiping. The ease with which you made the animated slide-up sharing menu is the kind of stuff that makes someone one of those fabled "10x" programmers).
Awesome
Thanks, Mohammad!
where is result?
This is part of a RUclips Playlist. Here are the rest of the videos: ruclips.net/p/PLHDMmeIMXj8VErZQxkeUnBadPaFxEL4kl
you are really amazing sir , i am from india , i have already youtube channel , i started my youtube channel to teach poor student that can't afford online Bootcamp and online course , please sir ,you have a great knowledge please teach us any complete project from sketch (form idea to complete app to publish apple app store) ,you have a great knowledge , and you know how to share knowledge, please teach us........
Thank you! I am in a middle of a series right now that starts from the very beginning of app development. You can find it here: ruclips.net/p/PLHDMmeIMXj8UV9xqF7Mr2Puh8xehDCy-O
Video is called “Reusable Custom Popups” so I don’t get why it spends a minute saying “you could also do it this way” and demonstrating a non-reusable pop up. I think it would be a better video if that irrelevant tangent was completely cut out.
In general, I don’t like instructional videos that spend too much time discussing/demonstrating the wrong way to do things.
I do prefer your videos to most others - so this comment is meant to be constructive. Thank you for making all these videos.
Thank you, I appreciate the feedback! 👍🏼
Mark Moeykens Do you do any private tutoring? I have an app I’ve been working on (as a hobby mostly) for about a year now. It’s a utility of sorts that I’ve shared with about 8 people. The app works, and they all love it - but I’m not happy with it and want to re-write parts of it.
Specifically, I have 2 custom views that I reuse throughout the app but I’m pretty sure I made some rookie mistake when I created them - or when I try to use them - because I often have to do all kinds of stupid little things to make them render properly in collection views, table views, etc...
If your time is not too expensive, I’d like you to take a look at how I’ve built the custom UIView and explain to me where I went wrong and ideally how to fix it... or, in lieu of payment, maybe you could use this exercise as the subject of a future video tutorial...? Oh yeah - I don’t use storyboards, so it’s all stored in 2 .swift files.
Hi, I'm sorry, I don't do any private tutoring. I've pretty much over-allocated my time with 4 jobs and a family. 😃