I am visually impaired iOS programmer and found your channel recently. Thank you for describing everything during the video. Very hard to find good tutorials when the video creator does not describe anything.
This video helped me a ton in designing a page with which I was struggling for hours (mainly cause of my lack of fundamental knowledge about constraints). Thank you for this.
Extremely helpful. 4 constraints rule was something I would never have heard of as a someone who just needs to know this for once since it's not my job to dev iOS apps every day.
Great.Please a make video on app rejection .how we reply to apple about specific bug and updation process .This is very useful for the junior developers.
Sean, Great tutorial. I've watched a few others (I paid for) and this one is way better. You explain everything very clearly. Would love to see a more advanced tutorial from you on this subject.
Hey Sean, thank you very much for man for an outstandingly good tutorial on a very critical subject matter! I am already waiting for you in the next episode! Keep up the good work. Henry
I always been struggled with the iPhone SE dimensions. It's a really pain in the ass hahaha. I really like the video. Well explained and very straightforward. Actually, this gives me an a idea for fixing an image view that I was setting wrong on a project. So thank you for sharing your knowledge Sean 🙌
Hey Sean, great content. I have a remark regarding the starter-project. Maybe not 'beginner'-grade perse, but useful nonetheless. • In line #34 in SATextField you can use the ‘nil-coalescing’ operator instead of the ternary, resulting in slightly more elegant code: let placeholder = self.placeholder ?? "" • And you can have your custom views also render in Interface Builder, if you add @Designable above the class definition and add a function like: override func prepareForInterfaceBuilder() { super.prepareForInterfaceBuilder() setUpField() } Also maybe not new for you, but if someone else profits: 👍 Great stuff! Keep it up.
Loved the view. For for me it was the right amount and it had great hooks for added learning. One thing that annoyed me on my project was that my background image aspect ratio was weird so when it previewed it looked off. I found that if I added `backgroundImageView.contentMode = UIView.ContentMode.scaleAspectFill` to the setBackground method it took care of that. Thank you!
Thanks Daniel. I've thought about it, but there are so many different ways to do it... Need to think about what approach I want to teach. And for that I'd need to do some research.
Hey Sean, It was really nicely explained. But the main thing here is the warnings which you can clearly see in the storyboard view hierarchy and that was the reason I was watching your video but you haven't shown what are the warnings and how to fix them.
Sean Allen I certainly am. I suffer from heavy imposter syndrome. I want to learn IB but seeing the code is easier for me right now for some reason. So I really appreciate you showing both IB and Programmatic approaches. I am a frontend engineer for work.... I have always always always wanted to be an iOS engineer and an opportunity recently presented itself.
Sean Allen am curious about the ways people typically handle their api data code in terms of app structure. Have you done any videos or seen any articles on this or do you have a viewpoint on this?
I have not done any videos on that yet as it's a more complex topic and a time consuming video. However, I'm going full time content creation after July 1, so I'll be pumping out more complex videos.
Thanks, please make a video on designing complex UI, I still can't seem to figure out how to do it. Like in the UI you designed in this video, had there been a couple of more text fields above the email textfield they would overlap with the image or label on a smaller device like 5s. Please make a video on how views should resize on different screen sizes.
I have that video planned. This was for beginners who are unfamiliar with Auto Layout or just starting to learn. That's why it's labeled "Beginner". A more advanced one will come soon.
This is great! What if you wanted a view (or a label or button, etc.) that occupies the top half of the screen when in portrait but the left half in landscape? Using storyboard? Programmatically?
One thing is a bit confusing. If you uncheck "contrain to margins", why is there a need to change the dropdown settings as well? I thought they were the same, so each time i would just check/uncheck when setting up contraints, but never used the dropdown...or knew it was there XD Great tut as always! Thanks!
@@seanallen Ah...silly me XD I aways used control-drag when working with auto-constraints so i guess that is why it got confused...totally makes sense now XD
Nice tutorial Sean. I was looking through your SA constant files. One this I found hard to understand were the two init methods. What is coder/decoder/nscoder? Why is it required? Do you have any videos that explains these methods?
The one with the decoder has to do with initializing and instance of that view form storyboard. So you need an regular initializer and then a special one to handle interface builder.
I have a question. Why did you use the align constraints for the logo first, why not just use height, weight, and left and right constraints ? like for the other views you did.
Nice tutorial as always 👍. Could you do one on Today Extension Widget with different scenarios? (like when using the main app UserDefaults or Database)
Thanks for the kind words. I've never actually had to build a Today Extension Widget, so no tutorial on that anytime soon. However, if I ever have to build one for work or a project, I'll be sure to add it to my list of videos.
You mentioned that you can adjust the UI based on screen dimension. What is the best way in your opinion to read screen dimension when the app loads up?
Hi. Thanks for you video content. Loving you way of showing swift. Really good job. Seams like they remover autoshrink. I noterad that when do iPhone 15max and the iPhone 8 i camt really make text look good becuse it to big screendiffrence. Do you know if thers a way to adapt text size based on the screen? So it look good even on small sxreens?
Nice video man. Quick noob question tho... What are the advantages/disadvantages, if any, in designing your text fields programmatically rather than just doing it in main.storyboard? Just personal preference?
Hey Matt, the main reason is that it saves duplicate work. Very often in an app, whatever style you go with on a text field, will be the same on all (or most text fields). For example, in the app I'm working on we have custom AuthTextField that we use during our entire onboarding process (the user fills out forms and stuff). So, if we want to make a change to our text field styles we just need to make the change once in the subclass, and we're done, rather than going to each individual textField in storyboard and making the change.
All of this could be done with the old autosize. You forgot to mention the main reason why we need this: Internationalization (and a handful of things autosize didn't work, like alignment). Other then that good video.
Hi Sean thanks for the tutorial I loved it, I have a question, I have 2 buttons i wanna split screen half and half, side by side between them how to achieve that?
This could be for many reasons. The most common one you're probably seeing is about localization. But they can pop up for hundreds of reasons. I would need to see the error.
Hey, great video with quality! I just have one question, how did you get the xcode color theme to be dark? Not just in the text editor but all of xcode?
Hi Sean! Thanks for the great tutorial! I ran into some issues and was wondering if you had any time to give me your insight into them. 1. When I set the leading and trailing constraints for the textfields and button, xcode gives me a warning about localization issue with set leading or trailing constraints, and tells me to set one of them to >=. If I change it to >= or
HI Alvin, for number 2, you are correct... they are the same size classes. You'll have to write some conditional code to change the constraints based on the specific device type. This also needs to be done programmatically as there is no way to do this in the storyboard. I just live with the localization warnings. Those don't come into play until you plan on localizing your app into another language. Which is an entirely different process in and of itself. If you're just learning, localization is way down the line.
@@seanallen I ended up using a StackView for #1 which ended up erasing those warnings. Next time i'll keep in mind that I can just ignore them. Thank you!!
How did you customize your Xcode color to red? It looks great. Edit: I meant the menu color of the Inspector and Navigator tabs. Not talking about Source Editor & Console.
That's the thorn in every developers side... the keyboard on iPhone 5 screen size, lol. I feel your pain. It's on my list of videos to do. I'll likely just have to pick 1 or 2 ways to do it, since there are many different ways, and many different variations. Which I'm sure will fill up the comments section...
Is there a construct in Swift which could be used to avoid redundancy like the one about 8:30 ? For example in VBA you would write With backgroundImageview .topAnchor (...) .bottomAnchor(...) (...) EndWith
Great tutorial Sean, I've come back to it several times! I tried stealing your SAButton.swift code, but stepped onto a few 'rookie' landmines in the process. All good - learning opportunities, right?
xcode storyboard suddenly pushes the control backwards and the options for bringing it in front is disabled. (Editor -> arrange -> Send to front .. is disabled ) .. how to enable or how to move the control to front in z order im using XCode Version 11.6 (11E708)
🚀 iOS Dev Launchpad - Swift basics, build apps, programmatic ui, general programming knowledge, and more - seanallen.teachable.com/p/ios-dev-launchpad
Thanks a bunch finally someone that actually makes beginner videos that a beginner can actually understand
Glad you enjoyed the video and my teaching style, June 😀
Yes goddamn it, finally a video on those damn auto layout constraints.
Haha, happy to deliver. 👍
@@seanallen yeah cool video keep this up sean
@@seanallen thank you for the videoooo
Finally the tutorial that I was really waiting for. Thanks Sean ❤❤❤❤❤
Happy to help!
I had been struggling with constraints ever since I started IOS development and halfway through your video it all just clicked for me. Thanks alot!
That "click" moment is always an awesome feeling! Happy to help!
I am visually impaired iOS programmer and found your channel recently. Thank you for describing everything during the video. Very hard to find good tutorials when the video creator does not describe anything.
Happy to hear my explanations were helpful, Kristhian!
This video helped me a ton in designing a page with which I was struggling for hours (mainly cause of my lack of fundamental knowledge about constraints). Thank you for this.
Happy to help, Nithin!
couln't teach better. Love how you go in the details and explain the logic and reasoning behind every step. Many thanks for your content.
Extremely helpful. 4 constraints rule was something I would never have heard of as a someone who just needs to know this for once since it's not my job to dev iOS apps every day.
Yeah, that rule helped me out a ton when I was just starting. Glad you found it helpful!
Hey Sean, great work covering the basics while remaining calm and still being fast enough to follow your work. Keep it up man!
Thank you a ton. Before this, it looks like something came through and unapologetically TP'ed my storyboard with constraints.
Hahaha, hopefully now your constraints look a lot cleaner.
You're really good at explaining your code and what you do!
Thanks Charles, I appreciate that!
Sick video brotha, you're really good at explaining. Clear and concise!
Thanks! Glad you enjoyed it.
Great.Please a make video on app rejection .how we reply to apple about specific bug and updation process .This is very useful for the junior developers.
Thank you a bazillion times Sean. Now i understand how to group and manipulate constraints. - Joesta
Happy to help!
Sean, Great tutorial. I've watched a few others (I paid for) and this one is way better. You explain everything very clearly. Would love to see a more advanced tutorial from you on this subject.
Thanks for the kind words, David 😀
Hey Sean, thank you very much for man for an outstandingly good tutorial on a very critical subject matter! I am already waiting for you in the next episode! Keep up the good work. Henry
Thanks Henry!
@@seanallen You are welcome Sean!
I always been struggled with the iPhone SE dimensions. It's a really pain in the ass hahaha. I really like the video. Well explained and very straightforward. Actually, this gives me an a idea for fixing an image view that I was setting wrong on a project. So thank you for sharing your knowledge Sean 🙌
Happy to help Felipe!
Excellent beginner run through of constraints perfect thanks Sean!
Thanks Steve. Glad you liked it!
Your videos are great - informative and entertaining to hold attention, great work!
Thanks for the kind words, Hari! Glad you like the channel 👍
Thanks for detailed review of several topics in one video!!!
Glad it was helpful, Alexey!
Your explanation and guidance is extremely helpful. Thank you Sean!
Glad it was helpful!
Good one Sean. Expecting more useful and informative video's on the autolayout as-well as on the animations in the future.
Love from the India 😊
Thanks Chintan 👍. I've got a looooooooong list of videos ideas to get to. I'm sure I'll revisit the topic soon
Even though you talk really fast, its very detailed and easy to understand.
Glad you liked it, Mike. I'm constantly trying to improve my speaking speed on camera. It's a work in progress 😀
This was exactly what I needed. Can you give examples about how to make an app look good going from portrait to landscape?
Best video explaining these! Thank you.
Great video Sean! I would love to see an advanced one :)
I'm gonna see how this video performs and what kind of feedback I get, so we'll see!
Fair enough, I will cross my fingers for it 😜
Hey Sean, great content. I have a remark regarding the starter-project. Maybe not 'beginner'-grade perse, but useful nonetheless.
• In line #34 in SATextField you can use the ‘nil-coalescing’ operator instead of the ternary, resulting in slightly more elegant code:
let placeholder = self.placeholder ?? ""
• And you can have your custom views also render in Interface Builder, if you add @Designable above the class definition and add a function like:
override func prepareForInterfaceBuilder() {
super.prepareForInterfaceBuilder()
setUpField()
}
Also maybe not new for you, but if someone else profits: 👍
Great stuff! Keep it up.
Yup, good info Frank. I'm actually not a fan of @IBDesignable. In my experience it's made storyboards slower and more clunky.
nice work man, your videos are really helping me. Keep the good work going
Happy it's helpful, Gaurav!
Great Video On Constraints. You have cleared my doubts
Happy it helped!
Loved the view. For for me it was the right amount and it had great hooks for added learning. One thing that annoyed me on my project was that my background image aspect ratio was weird so when it previewed it looked off. I found that if I added `backgroundImageView.contentMode = UIView.ContentMode.scaleAspectFill` to the setBackground method it took care of that.
Thank you!
Glad you found the video helpful!
Very beginner friendly and well explained. You have my thanks and my sub!
Glad you enjoyed it, Naalein!
Sean please create a video on Autolayout Priority and Multipliers in details and also some hint on AutoResizing.
Great video, keep up the good work! Any plans to make video about moving bottom section when keyboard is shown?
Thanks Daniel. I've thought about it, but there are so many different ways to do it... Need to think about what approach I want to teach. And for that I'd need to do some research.
Hey Sean, It was really nicely explained. But the main thing here is the warnings which you can clearly see in the storyboard view hierarchy and that was the reason I was watching your video but you haven't shown what are the warnings and how to fix them.
Thanks Sean! Your videos and story are inspiring to me.
Happy to hear that Christopher! I hope you’re finding the channel helpful.
Sean Allen I certainly am. I suffer from heavy imposter syndrome. I want to learn IB but seeing the code is easier for me right now for some reason. So I really appreciate you showing both IB and Programmatic approaches. I am a frontend engineer for work.... I have always always always wanted to be an iOS engineer and an opportunity recently presented itself.
Nice! Feel free to reach out with questions of you have them. I’m always happy to help people get started in iOS!
Sean Allen am curious about the ways people typically handle their api data code in terms of app structure. Have you done any videos or seen any articles on this or do you have a viewpoint on this?
I have not done any videos on that yet as it's a more complex topic and a time consuming video. However, I'm going full time content creation after July 1, so I'll be pumping out more complex videos.
wonderful tutorial hope you made us more video but i will love to see it compatible on landscape mode the easiest way
Amazing tutorial thank you for that! did you made the complex ui constraints explanation video also?
Did you make a video about fixing issue when keyboard covering content? I really need this :-)
nicely explained , please make a video on stack view.
Thanks Sachin. I have that on the list!
Love your video’s, learn so much in so little time!
Happy to hear that Jeff! Glad you like them 😀
Thanks, please make a video on designing complex UI, I still can't seem to figure out how to do it. Like in the UI you designed in this video, had there been a couple of more text fields above the email textfield they would overlap with the image or label on a smaller device like 5s. Please make a video on how views should resize on different screen sizes.
I have that video planned. This was for beginners who are unfamiliar with Auto Layout or just starting to learn. That's why it's labeled "Beginner". A more advanced one will come soon.
Sean Allen Thanks a lot, eagerly waiting for the same :)
Very useful video, like always!! Great job!!! 👍
This was really helpful! Could you do a video on ViewControllers with more complicated constraints?
I do have a part 2 of this type of video planned that will be more complex. This was a video meant for beginners.
@@seanallen Ok, Awesome! I really struggle with constraints and I look forward to using that video as a resource.
I am so glad tou seen this video tu background image ..... Very helpful video
I need a video that shows me how to set a background before I can learn to set constraints programatically. How did you do the beginning first codes
Ha ha ha, "Tie Fighter"! I love it.
Once you see it, you can't unsee it.
Two Great instructors....you guys should do a collaboration video 💡
@@30guarino for sure!
I don't remember if Sean was the first person I heard say that (probably was, though), but that's the only way I think of the constraints editor now 😂
Nice video 👍.
One question tho, why do you not use multipliers for width/height and aspect ratios?
Great video, learned so much :) seems to be easy to use auto layout in storyboard.
Thanks. Glad you enjoyed it!
Thanks mate. This video is really help me a lot.
Glad it helped, Cat!
This is great! What if you wanted a view (or a label or button, etc.) that occupies the top half of the screen when in portrait but the left half in landscape? Using storyboard? Programmatically?
One thing is a bit confusing.
If you uncheck "contrain to margins", why is there a need to change the dropdown settings as well? I thought they were the same, so each time i would just check/uncheck when setting up contraints, but never used the dropdown...or knew it was there XD
Great tut as always! Thanks!
The drop down is for what you want to constrain the object to.
@@seanallen Ah...silly me XD I aways used control-drag when working with auto-constraints so i guess that is why it got confused...totally makes sense now XD
Can u make a little complex one .. to do app ui modern .. how does it sound?.
Nice tutorial Sean. I was looking through your SA constant files. One this I found hard to understand were the two init methods. What is coder/decoder/nscoder? Why is it required? Do you have any videos that explains these methods?
The one with the decoder has to do with initializing and instance of that view form storyboard. So you need an regular initializer and then a special one to handle interface builder.
Sean Allen do you know anyplace where it explains the terms itself. I mean coder/decoder/nscoder?
Like always great video Sean😉
Thanks! I appreciate that.
Is there a video that includes info on how to fix the keyboard covering the login text fields? TIA!
I have a question. Why did you use the align constraints for the logo first, why not just use height, weight, and left and right constraints ? like for the other views you did.
Nice tutorial as always 👍. Could you do one on Today Extension Widget with different scenarios? (like when using the main app UserDefaults or Database)
Thanks for the kind words. I've never actually had to build a Today Extension Widget, so no tutorial on that anytime soon. However, if I ever have to build one for work or a project, I'll be sure to add it to my list of videos.
Sean Allen an advanced auto layout one then? 😊
Hey! Great video, I think you covered everything in a very nice way.... At least for my project, I got everything I need :D
Happy to help!
Please make videos on how to create complex UI programmatically.
I've done a couple
You mentioned that you can adjust the UI based on screen dimension. What is the best way in your opinion to read screen dimension when the app loads up?
Hi. Thanks for you video content. Loving you way of showing swift. Really good job.
Seams like they remover autoshrink. I noterad that when do iPhone 15max and the iPhone 8 i camt really make text look good becuse it to big screendiffrence. Do you know if thers a way to adapt text size based on the screen? So it look good even on small sxreens?
Thanks for your education man!
No worries!
Nice video man. Quick noob question tho...
What are the advantages/disadvantages, if any, in designing your text fields programmatically rather than just doing it in main.storyboard? Just personal preference?
Hey Matt, the main reason is that it saves duplicate work. Very often in an app, whatever style you go with on a text field, will be the same on all (or most text fields). For example, in the app I'm working on we have custom AuthTextField that we use during our entire onboarding process (the user fills out forms and stuff). So, if we want to make a change to our text field styles we just need to make the change once in the subclass, and we're done, rather than going to each individual textField in storyboard and making the change.
@@seanallen Makes perfect sense. Appreciate it!
Happy to help 👍
All of this could be done with the old autosize. You forgot to mention the main reason why we need this: Internationalization (and a handful of things autosize didn't work, like alignment). Other then that good video.
very Useful video.. waiting for next video
Glad you liked it!
This helped me so much. Thank you
Happy to help, Taylor.
Great video Sean. Where can I download the sample code?
Thanks Debbie. There should be a link to the source code in the description.
Hey, you talked about moving keyboard when we tap on text field. Do you have any video related to that , how to move screen up!!
Brother add more video on this topic bcs of very less video on youtube about autolayout in xcode 10.1
Great Video Man. Huge Help!!!!
Happy to help, Makan!
Great video tutorial many thanks
Happy to help, Drei!
I just can't thank you enough
Glad you enjoyed it!
Thank you for creating this video!
Hi Sean thanks for the tutorial I loved it, I have a question, I have 2 buttons i wanna split screen half and half, side by side
between them how to achieve that?
can i get a full tutrial on auto layout in storyboard having UIView, UIImageView, UITableView,UIButton all are in the same screen ....?????
Auto layout on storyboard always gives me a yellow triangle warning. Sometimes I have no way to get rid of it. Can you explain it a little bit?
This could be for many reasons. The most common one you're probably seeing is about localization. But they can pop up for hundreds of reasons. I would need to see the error.
The logo stopped showing up when I made the adjustments. I can see it on the storyboard, but it disappears when I run it.
Great tutorial by the way
Any help or advice on how to sort out the logo issue?
That is a great tutorial.Thanks!
Hey, great video with quality! I just have one question, how did you get the xcode color theme to be dark? Not just in the text editor but all of xcode?
That's new in macOS Mojave and Xcode 10.
@@seanallen Thank you!
please do a tutorial building an app using corebluetooth and ble connection please
Good job, my man!
Thanks! Glad you liked it 👍
Hi Sean!
Thanks for the great tutorial!
I ran into some issues and was wondering if you had any time to give me your insight into them.
1. When I set the leading and trailing constraints for the textfields and button,
xcode gives me a warning about localization issue with set leading or trailing constraints,
and tells me to set one of them to >=.
If I change it to >= or
HI Alvin, for number 2, you are correct... they are the same size classes. You'll have to write some conditional code to change the constraints based on the specific device type. This also needs to be done programmatically as there is no way to do this in the storyboard.
I just live with the localization warnings. Those don't come into play until you plan on localizing your app into another language. Which is an entirely different process in and of itself. If you're just learning, localization is way down the line.
@@seanallen I ended up using a StackView for #1 which ended up erasing those warnings. Next time i'll keep in mind that I can just ignore them. Thank you!!
Good into Sean!
Glad you liked in, Glenn 😀
Is there a way to show the ui elements in storyboard with the custom styling defined in code?
this helped me alot, cheers mate!
Happy to hear that, Miguel!
How did you customize your Xcode color to red? It looks great.
Edit: I meant the menu color of the Inspector and Navigator tabs. Not talking about Source Editor & Console.
It is done in general settings.
@@highschoolkoder8650 I couldn't find any option to change inspector and navigator color accent. I am not referring to source editor and console.
Go to setting > general > accent color and choose red...
@@highschoolkoder8650 Oh my freaking god! 😱
I have changed few setting from that General, but never saw the Accent option. 😬 Thank you so much!
Have another tutorial that walks through the keyboard solutions? Esp on iphone 5?
That's the thorn in every developers side... the keyboard on iPhone 5 screen size, lol. I feel your pain. It's on my list of videos to do. I'll likely just have to pick 1 or 2 ways to do it, since there are many different ways, and many different variations. Which I'm sure will fill up the comments section...
Sean, I was wornding if you could show how yo downloade the file on Xcode. I really don't know ... many files ... don't know how to.
excuse me, can you help me, i'm having a problem about error domain 9806 and 9807 requires a certificate of trút.Thank you
Is there a construct in Swift which could be used to avoid redundancy like the one about 8:30 ? For example in VBA you would write
With backgroundImageview
.topAnchor (...)
.bottomAnchor(...)
(...)
EndWith
Really good video. Thanks a lot!
Great tutorial Sean, I've come back to it several times! I tried stealing your SAButton.swift code, but stepped onto a few 'rookie' landmines in the process. All good - learning opportunities, right?
Nice! Happy to hear the tutorial has been that helpful. Try this for a custom UIButton - th-cam.com/video/scTO8N6wc8A/w-d-xo.html
xcode storyboard suddenly pushes the control backwards and the options for bringing it in front is disabled. (Editor -> arrange -> Send to front .. is disabled ) ..
how to enable or how to move the control to front in z order
im using XCode Version 11.6 (11E708)
Is that the Cracking the Coding Interview book under your basketball?
It sure is.
Any idea why I'm not able to drag and drop buttons or text fields etc onto my screen?
Thank you for the useful video!
my (yours) swift code can't seem to locate the background image resulting in white background. how do i sort out path etc.?
So theoretically, could I set top and bottom anchors instead of specifying height?
Yes, and then it could possible stretch depending on what you pinned it to
@@seanallen Awesome, gonna mess around with this tonight, you're a real homie!
Okay, but how do I have a background Image that doesn't look strecthed?