Yeah, but this extension for protocols looks nice but cannot be done in a jvm environment so kotlin can’t do that, you have to implement the methods in the class or a new interface(that will use inlining)
Mannn! One thing I like about your videos is that the explanations are crystal clear, and the codes incredibly neat and tidy. Really satisfying and sexy! Keep up the great work man!
I didn't even need the wrap-up at the end. It was very easy to follow. I agree that the abstractions help understand the code better, so they're worth it.
Man it's insane how every problem that im facing while trying to build something programatically, you've already made a long, specific, teaching video to solve my issues. THANK YOU!
Excellent video! You are by far the best Swift instructor I have come across. Your ability to explain exactly what you are doing and why you are doing it is phenomenal and VERY helpful to the viewers! I learnt a lot from this video.
couple of day's ago i start thinking to switch from storyboard to code and you start to do a lot of only code tutorial i think that this is a sign for me to switch right now :D Thank you for this great tutorial keep going
There has been pent up demand for these kinds of tutorials from me for a while now. I'm just finally getting around to them. My overall philosophy on storyboard/code hasn't changed.
@@seanallen i'm also still not ready to completely switch to code i think it will be great to mix storyboard with code beside that i love storyboard :D any way i liked your style in explain things keep going and if you can make a tutorial about Design pattern it will be much appreciated
Good video and I too find programmatic code very verbose. Luckily with SwiftUI, this entire list with cells can be written in about 15 lines. Doing videos in the future will be much easier.
Thanks Brian. I agree, Swift UI basically makes this tutorial irrelevant. But, as you know, we're a few years away from that. I'm looking forward to that day tho
@@seanallen I always forget what makes the cells not refresh correctly after dequeing, where photos get placed in the wrong cells when scrolling quickly up and down.
What I would really like to see is a video on the new Diffable datasource including all CRUD actions plus move rows. This would really be helpful moving forward.
I’m taking this exact thing at DevMountain right now and it’s still confusing. I appreciate the video. Since the corona virus I wasn’t able to go to Utah. So it’s online for now and I’m not to happy with it.
Not bad. Couple of questions: Since you're calling the the overridden constructor init(style:reuseIdentifier:), and passing in a style, what should be done with the subview labels the superclass adds, since each of the UITableViewCell.CellStyle cases adds some subviews and don't claim to return a blank cell? Wouldn't you optimally want clear the subviews it creates first? So how do constraints work if you're not grabbing the protototype cell from Storyboard? Setting the constraints of your own cell subviews to contentView is fine, but when does contentView know about the tableView width/height it will be inserted into? When the cell is dequeued? And finally you might want to mention prepareForReuse() method for the UITableViewCell subclass, which is where the cell can clean itself up for the next post-dequeue processing in the tableView delegate.
Hey Sean just looking at your video with is great!....Just a quick suggestion...screen shot the app UI or run the app on another simulator, so we can see what's being implemented and you can use the mouse instead of your fingers to explain it...... Happy Holidays and Good Luck on your future course premiere!
Nice video, i am learning to use programmatic way to design view for ios. So this video is quite useful for me, help me understand a lot. Hope it will come more programmatic view design. :D
I mean this is the absolute nicest way possible... Get used to it. Swift is a VERY young language so change is to be expected. Also, the profession of a software developer has to be able to deal with change as technology is constantly evolving.
Kevin, I think it would be fair to say that there hasn't been many changes in the last 3 months. Subtle changes maybe but nothing major. If you are referring to the introduction of SwiftUI as a change, the reality is that SwiftUI is an addition to the available frameworks rather than a change. UIKit is here to stay for a long long time as both Sean and Paul Hudson have said on many occasions.
Im a bit like that, but i suppose the other comments are right we just need to learn. But it does seem to have come at a rotten point in my learning. But lets persevere bro
Custom Cell Aren't Seguing? HERES THE SOLUTION!!! On the storyboard: Create a segue from the cell to the next ViewController. Don't forget to name the segue in Attributes inspector and "NAME THIS WHATEVER YOU WANT". In the TableViewController add this by the other override functions: override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { self.performSegue(withIdentifier: "NAME THIS WHATEVER YOU WANT", sender: self) } I don't know if this is a bug that's never been fixed or if it's some kind of "feature". But it drove me NUTS and it's not talked about enough.
What's the reason you prefer extend your UIViewController class and then create delegates ? Why not subclass UITableViewController directly in your class - that way you got all those functions and tableView etc "for free" without need to type or instantiate anything
Hey Sean, great video as always! Just one small thing: Shouldn‘t you add the image view and title label to the cell‘s content view instead of the cell itself?
@@ArnsEnglander It's a design feature (or quirk) of UITableViewCell. Because the cell is responsible for the showing of various accessories, the contentsView is a container to put our custom elements in. Its dimensions (and thus layout) will change when accessories (e.g. checkmark) are shown/hidden.
Hi Sean, fantastic video! I am adding this video list VC layout to an existing app project. I am using storyboards for the time being. I did pickup in the video where you added a tableView to an existing UIViewController. I have never taken that approach though I am a newb. What advantages are there to adding the Table View to a UIView Controller in that way? Also, I created the UIView+Ext file and created the pin function but for some reason Xcode wants my superview to be unwrapped and recognizes it as an optional so I used "bottomAnchor.constraint(equalTo: superview!.bottomAnchor).isActive = true" and forced unwrapped the superview. I realize the hazard with force unwrap but I am not used to working with tableView inside of a UIViewController like this. Any recommendations? I suppose I could just drag a UITableViewController onto storyboard then incorporate the required tableView functions and pickup from that point in the video? I am going through your course on your site and it is amazing as well!
Hey Mike, the main reason I like to add TableViews to a ViewController rather than using the built in UITableViewController is that I've found it offers more flexibility. It's been a while, but last I tried to use a UITableViewController it was pretty restrictive. That seems to me meant for basic TableViews. So I've built the habit of creating my own TableViews so I always have the flexibility I need.
Great explanation, great tutorial as always.. . Sean, can you please suggest some more reference or some textbooks for mastering programmatic approach rather than storyboards.. I have been searching for it for a long time and so far, I could not find one, all of them use storyboard approach.. . I mean, how I can learn the programmatic approach like you did..? there should be some, right..? ) thanks in advance, even if you might not reply back.. .
I just practiced it little by little. Started with doing one view, then one screen, then entire projects. It takes practice. I'm creating a course at the moment that will do things 100% programatically. There's a RUclips channel called "Let's Build That App". He does all his tutorials programmatically, which may help.
Hi. Thank you for these videos. They are incredibly detailed and easy to follow. You 'cover all of the bases' so to speak. I wonder if I can get your thoughts, however. After following this video and creating a custom cell, it seems as though the tableView only shows the last object in the array. Any thoughts offhand on where I can look?
Hi Sean. Thanks to your lessons, I got my first developer job. But team development turned out to be much more complicated than I expected. We use Coordinators and VIPER, all that without storyboards. Could you tell us more about this and about commercial development. Thank you!
Sean, are you always do align the code manually like this 12:15 and 13:47? If yes, there is a way to do it automatically., just by pressing one hotkey to align a bunch of lines simultaneously. Just go *Xcode -> Xcode Extensions* and install the *AlignmentForXcode* extension. That's much easier to do it with single hotkey press. I was completely sure, that you already know it, when I did saw your file at 0:42, but I did lost that sureness later, when I did saw as you do it manually on 12:15 and 13:47. And, maybe if you didn't know about the extension, dive into this and tell us about what are the Xcode extensions you found useful
Hi Sean ! if I setup a UI button trigger something inside custom cell class, and use a dequeuereuseable cell inside cellForRowAt indexPath, how to prevent multiple triggers when cell being reuse?
when I want to add UIElements Programmatically I Usually do it like this: let view: UIView = { let view = UIView() //Configurations // return view }() I feel this way everything is more way cleaner.
That's a perfectly fine way to do that. I'm not a fan of that method because I find that the top of my file is all cluttered up with configurations. Just a personal preference.
here is an awesome article I found that that walks you through how to do this! I walked thru the tutorial and added some actual api calls to test it out! the article -> medium.com/capital-one-tech/smooth-scrolling-in-uitableview-and-uicollectionview-a012045d77f my implementation -> github.com/ncooke3/MVVMAsyncTableView
Heyy, thank you , good stuff, I hope to see more videos without usage of StoryBoard, I really hope you will make more! Question: Can you explain how to use segue , in code without storyboard, and how to send data from indexPath.row to another ViewController object. Example: If I have an Custom Button in my cell which will push new ViewController, and I want the content of the cell to be send to some objects in my new ViewController. Thank you!
Hi Sean Thanks a ton for all the videos! I am stuck in 1 of my projects where I have tableview with customcells and inside the cell i have an image view and i am getting the images from the API and using there but now I want to integrate pinch zoom into it and we want to zoom the whole tableView together not a particular cell at a time. So the problem I am only able to zoom in the center like you showed in this video but not in corners and all. And I have text in the image so i want it to zoom inother places also not just in center. And when i integrate pan gesture for drag then it is not able to scroll through the tableView as it gets confused between grab and scroll and gets stuck at that particular image only, so I can't do that as well. Can you please guide on how to solve this issue? How to zoom in other parts also not just center???
Hi, i build my tableView exactly like you and it works fantastic. After that i build a second view controller and passed the Data to make a Detail View Controller. I make that with your video „Pass Data Between View Controller“ and it works amazing. But now i have a problem, i would like to make a third view controller and get the information from my DetailView Controller and not from the Table View. But i stuck here and i actually dont know how i can fix this. Have you some tips for me? Best reguards Heinz
Hii I have 2 questions, how can we add background image on that..? Not in the table view contents. 2nd, how to make round corners on table view and transparent and add some colour with opacity 50%..? Please help me.. Thanks 😊
What is the difference between: 1) using tableView.rowHeight in line 24 and 2) using tableView method: func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat
Hi Sean, I love your videos and I learned really a lot. But I have no idea how I can create a following view controller when I tapped one of the "video" button in the table view. I saw this in that video from you (iOS 11 Navigation Bar Update) I really hope you can help me :) Thanks
Hello Sean, Could you please advise, how to include the image and title for the header section using UITableView without storyboard. I am struck with registering the class
Hey Sean, I got a quick question; At the beginning, where you said you setup the file so you delete the file that the app won’t start with storyboard. Am I still able to use storyboards within my app? I have a 5 tabbed bar application, and one of my teammates has been developing in Storyboard before the big switch. Would be a shame to waste the work. In any case, hope you can give insight and Thanks for the video!
A lot. SwiftUI is fun to learn and play with for now... but it's not seriously going to be used in production for a few years. If you're trying to get an iOS dev job within the next 1-2 years... it's almost a certainty that it'll be in UIKIt.
18:29 Hi Allen I'm a beginner, I would like to know if it's possible to implement an action in video1.I also wanted to tell you that i love your videos they are helping me a lot you are an inspiration for me. Thanks for everything good day
In my project I also created a struct of Images and then tried to set msImage type as Images in the struct below struct MS { let msImage: Images let msTitle: String let msDescription: String } after that when I tried to create an array of MS calling images from the Images struct it is giving me an error message as under: 'UIImage' is not convertible to 'Images'. I am unable to fix this. Any idea what's going on ?????
It can go either way. The downside of a struct is that technically you could initialize an empty "Cells" struct. You'll see people do it both ways, but an enum would be slightly better because you can't initialize an empty one. It's trivial.
I've been having trouble with custom cells not performing segues... I've actually been doing a lot of research and I haven't found a single RUclipsr, create a custom cell, and then perform a segue on it. I don't know if that is just a coincidence or what. But if you can perform segues on those cells can you explain how you are doing it?
a few need to add thing for old version support and some sceneview issue " @available(iOS 11.0,*) @available(iOS 12.0,*) func ios12Support(){ self.window = UIWindow(frame: UIScreen.main.bounds) self.window!.backgroundColor = UIColor.white self.window!.makeKeyAndVisible() self.navigationController = UINavigationController(rootViewController: ViewController()) self.window!.rootViewController = self.navigationController } "
Hi Sean Great video! i have no errors when i do the code. But when i run it in the simulator it only gets black? The "no storyboard lecture" you did works great, but when i do this tutorial i dosen´t work for me, any idea what i am doing wrong? Thanks in advance!
Yes, in Xcode 11 and iOS 13, they introduced a new way to remove the storyboard programatically. That's why I made that "No Storyboard" video. You're not doing anything wrong. Xcode just updated the way it does things in Xcode 11 and iOS 13.
Hello, I am having a problem. My app crashes as soon as I initialize the properties on SceneDelegate and I don't know what I am doing wrong. I've already deleted all the references to the main.storyboard but it seems like it's still looking for it.
Hey Sean (or anybody reading this comment). I have been struggling with sizing/resizing of my custom controls and I have googled everything I can think of to try and find a good solution - but I have yet to come across a straightforward answer - so as a last resort, I’ve come here looking for help. I created a custom control that consists of a background label, an image and a few more label overlays. If I initialize it with a specific frame size, it looks great - but if the frame changes after initialization it doesn’t update itself and I have not found a way for the control to be alerted when it’s frame changes so that it can resize all of its sub views appropriately. I am certain there must be a straightforward way to do this - but I haven’t been able to find it - and to work around it, I have been including a function in all of my custom reviews that completely rebuilds all of its constraints and I’ve been calling it much more frequently than I need to in order to make sure that my view is displayed correctly - for example, when my control appears in a collection view - I rebuild all of constraints in the cellforitemat function every time I refresh the collection. I know that’s overkill and kind of defeats the purpose of cell reuse - but I don’t know what the alternative is. If someone can point me to a solution for this, I would be extremely grateful. Thanks in advance. @Sean: Sorry to hijack your comments with this question - but even if you’re annoyed with me for it - I doubt you’ll be as mean about it as the folks over at stackoverflow are. (It genuinely seems like they have more members devoted to telling people their questions are stupid than they have members actually willing to provide answers or helpful guidance!)
Dragos Rachieru No. I’ve never even heard of that setting. Not using storyboard. I think I just need to know the normal way that a UIView is notified that it’s frame has changed - then I can intercept that notification and make sure that all of its subviews are also resized appropriately.
Restrictive like if it's a SUPER basic TableView, then sure. But anything more than a SUPER basic TableView, I don't want to use UITableViewController.
Rashesh, a UTableViewController is tied to the concept of being a fullscreen view. Sometimes, you need a UITableView that only occupies part of a screen. (e.g. you have a banner or some chrome above the tableView). In those cases, you _could_ fudge things so that the UITableView has special sections and rows just for that UI, but it's not a good solution. It's better and easier to create a UITableView manually, and position it exactly where you need it in your view hiearachy.
Watch Next - iOS Take Home Project - Job Interview Practice - Free Preview - ruclips.net/video/MSIe2y6Fee8/видео.html
I just can't express how I grateful for this tutorial! You are amazing!
Happy to hear it was helpful!
Best programmatic table setup tutorial I've found. Awesome job explaining the details!
Glad it was helpful!
From a 6 year experience Android developer, this is a very informative tutorial. Swift is really kinda like a brother to Kotlin. Cheers
Yes, Kotlin and Swift are pretty similar. Glad you found it helpful!
Yeah, but this extension for protocols looks nice but cannot be done in a jvm environment so kotlin can’t do that, you have to implement the methods in the class or a new interface(that will use inlining)
Mannn! One thing I like about your videos is that the explanations are crystal clear, and the codes incredibly neat and tidy. Really satisfying and sexy! Keep up the great work man!
Thanks for the kind words, Jason!
I didn't even need the wrap-up at the end. It was very easy to follow. I agree that the abstractions help understand the code better, so they're worth it.
That's great to hear. Glad it was helpful 😀
Man it's insane how every problem that im facing while trying to build something programatically, you've already made a long, specific, teaching video to solve my issues. THANK YOU!
Happy to help, Noam 😀. If that's the case you'll probably love my courses at seanallen.co. (shameless plug 😂)
Excellent video! You are by far the best Swift instructor I have come across. Your ability to explain exactly what you are doing and why you are doing it is phenomenal and VERY helpful to the viewers! I learnt a lot from this video.
Thanks Kevin! Glad you enjoyed the video and that you learned from it 😀
Dude, this is brilliant! now i understand UITableView.
Happy it was helpful, Justin!
Hi Sean, I would say this tutorial has definitely helped me a lot!
Great to hear!
Great video! Thanks a lot Sean!
Glad you enjoyed it, Jose!
couple of day's ago i start thinking to switch from storyboard to code and you start to do a lot of only code tutorial i think that this is a sign for me to switch right now :D Thank you for this great tutorial keep going
There has been pent up demand for these kinds of tutorials from me for a while now. I'm just finally getting around to them. My overall philosophy on storyboard/code hasn't changed.
@@seanallen i'm also still not ready to completely switch to code i think it will be great to mix storyboard with code beside that i love storyboard :D any way i liked your style in explain things keep going and if you can make a tutorial about Design pattern it will be much appreciated
Good video and I too find programmatic code very verbose. Luckily with SwiftUI, this entire list with cells can be written in about 15 lines. Doing videos in the future will be much easier.
we all learn from you . you are awesome programmer
Thanks Brian. I agree, Swift UI basically makes this tutorial irrelevant. But, as you know, we're a few years away from that. I'm looking forward to that day tho
@@seanallen I always forget what makes the cells not refresh correctly after dequeing, where photos get placed in the wrong cells when scrolling quickly up and down.
I always love to do programmatically. You are great Sean.
Yo I had no idea about that snippets feature that's so damn cool.
Now you know 😀
Great seeing you do these tutorials again... Nice bedtime leisure to me ;)
Glad you liked it!
I do like the programmatic style. Thanks mate!
Sean, Tks for this video!! it was very helpful to me!!!
What I would really like to see is a video on the new Diffable datasource including all CRUD actions plus move rows. This would really be helpful moving forward.
Is there any video showing how to push diffrent UIViewController depends on which cell is pressed, programatically?
I’m taking this exact thing at DevMountain right now and it’s still confusing. I appreciate the video. Since the corona virus I wasn’t able to go to Utah. So it’s online for now and I’m not to happy with it.
“VideoListVC this is what you see” you almost caught some rap there , Sean lol 😂
Don't sleep on my flow...
Not bad. Couple of questions: Since you're calling the the overridden constructor init(style:reuseIdentifier:), and passing in a style, what should be done with the subview labels the superclass adds, since each of the UITableViewCell.CellStyle cases adds some subviews and don't claim to return a blank cell? Wouldn't you optimally want clear the subviews it creates first? So how do constraints work if you're not grabbing the protototype cell from Storyboard? Setting the constraints of your own cell subviews to contentView is fine, but when does contentView know about the tableView width/height it will be inserted into? When the cell is dequeued? And finally you might want to mention prepareForReuse() method for the UITableViewCell subclass, which is where the cell can clean itself up for the next post-dequeue processing in the tableView delegate.
Thanks for the lessons Sean, it's really helps me! 😉
This was really helpful!! Thanks alot!
Glad you enjoyed it, Dinisha!
Perfect timing. Thanks!!
Happy to help, Jerrick!
Great video! Could you do a similar style video about programmatically using UINavigation controller?
Hey Sean just looking at your video with is great!....Just a quick suggestion...screen shot the app UI or run the app on another simulator, so we can see what's being implemented and you can use the mouse instead of your fingers to explain it...... Happy Holidays and Good Luck on your future course premiere!
This is a good idea, David. I'll implement this in future videos. Thanks for the suggestion 😀
Nice video, i am learning to use programmatic way to design view for ios. So this video is quite useful for me, help me understand a lot. Hope it will come more programmatic view design. :D
Sean - great video! Thanks!
im mad cos i have been learning swift and xcode for like 3 months and it has changed so much now that i feel like i have to learn everything again
I mean this is the absolute nicest way possible... Get used to it. Swift is a VERY young language so change is to be expected. Also, the profession of a software developer has to be able to deal with change as technology is constantly evolving.
Kevin, I think it would be fair to say that there hasn't been many changes in the last 3 months. Subtle changes maybe but nothing major. If you are referring to the introduction of SwiftUI as a change, the reality is that SwiftUI is an addition to the available frameworks rather than a change. UIKit is here to stay for a long long time as both Sean and Paul Hudson have said on many occasions.
Im a bit like that, but i suppose the other comments are right we just need to learn. But it does seem to have come at a rotten point in my learning. But lets persevere bro
You are a genius! Great video.
Happy to help, Bryant 😀
I love you man you always help us
And I today is my birthday
Happy to help. Happy Birthday!
Do you have a video in depth of this part 16:45? The short explanation was also very helpful!
very good stuff. Thank you.
Glad you liked it!
great video, I just have one question. why the helper functions of the custom cell constraints are not called from didLayoutSubViews()?
Custom Cell Aren't Seguing? HERES THE SOLUTION!!!
On the storyboard:
Create a segue from the cell to the next ViewController. Don't forget to name the segue in Attributes inspector and "NAME THIS WHATEVER YOU WANT".
In the TableViewController add this by the other override functions:
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
self.performSegue(withIdentifier: "NAME THIS WHATEVER YOU WANT", sender: self)
}
I don't know if this is a bug that's never been fixed or if it's some kind of "feature". But it drove me NUTS and it's not talked about enough.
What's the reason you prefer extend your UIViewController class and then create delegates ?
Why not subclass UITableViewController directly in your class - that way you got all those functions and tableView etc "for free" without need to type or instantiate anything
For this basic TableView, that would work. However, I've found UITableViewController to be very limiting, which is why I always create my own.
What a great Video!!!
The beginner auto layout constraints is set to private, do you have an alternate video?
This saved my life
Hey Sean, great video as always! Just one small thing: Shouldn‘t you add the image view and title label to the cell‘s content view instead of the cell itself?
Good question. I'm not sure off the top of my head. I'd have to look into that.
@@seanallen Andre is correct.
@@w0mblemania why is that?
@@ArnsEnglander It's a design feature (or quirk) of UITableViewCell. Because the cell is responsible for the showing of various accessories, the contentsView is a container to put our custom elements in. Its dimensions (and thus layout) will change when accessories (e.g. checkmark) are shown/hidden.
Perfect. thanks!!!
Thanks Sean! 🧡
Good video sean thank
Glad you liked it!
Hi Sean, fantastic video! I am adding this video list VC layout to an existing app project. I am using storyboards for the time being. I did pickup in the video where you added a tableView to an existing UIViewController. I have never taken that approach though I am a newb. What advantages are there to adding the Table View to a UIView Controller in that way? Also, I created the UIView+Ext file and created the pin function but for some reason Xcode wants my superview to be unwrapped and recognizes it as an optional so I used "bottomAnchor.constraint(equalTo: superview!.bottomAnchor).isActive = true" and forced unwrapped the superview. I realize the hazard with force unwrap but I am not used to working with tableView inside of a UIViewController like this. Any recommendations? I suppose I could just drag a UITableViewController onto storyboard then incorporate the required tableView functions and pickup from that point in the video?
I am going through your course on your site and it is amazing as well!
Hey Mike, the main reason I like to add TableViews to a ViewController rather than using the built in UITableViewController is that I've found it offers more flexibility. It's been a while, but last I tried to use a UITableViewController it was pretty restrictive. That seems to me meant for basic TableViews. So I've built the habit of creating my own TableViews so I always have the flexibility I need.
how to trim and crop video ? sir, please create a tutorial.
Please talk about RXswift and combine
Tnx for this video...
Great explanation, great tutorial as always.. .
Sean, can you please suggest some more reference or some textbooks for mastering programmatic approach rather than storyboards.. I have been searching for it for a long time and so far, I could not find one, all of them use storyboard approach.. . I mean, how I can learn the programmatic approach like you did..?
there should be some, right..? )
thanks in advance, even if you might not reply back.. .
I just practiced it little by little. Started with doing one view, then one screen, then entire projects. It takes practice. I'm creating a course at the moment that will do things 100% programatically. There's a RUclips channel called "Let's Build That App". He does all his tutorials programmatically, which may help.
Hi. Thank you for these videos. They are incredibly detailed and easy to follow. You 'cover all of the bases' so to speak. I wonder if I can get your thoughts, however. After following this video and creating a custom cell, it seems as though the tableView only shows the last object in the array. Any thoughts offhand on where I can look?
Hi Sean.
Thanks to your lessons, I got my first developer job.
But team development turned out to be much more complicated than I expected.
We use Coordinators and VIPER, all that without storyboards.
Could you tell us more about this and about commercial development.
Thank you!
Every team is going to be different. I have no experience with coordinators and VIPER.
Hi there! Let me ask a question please, what was the point in deleting original ViewController. We could rename it if you'd like and whatever?
Sean, are you always do align the code manually like this 12:15 and 13:47? If yes, there is a way to do it automatically., just by pressing one hotkey to align a bunch of lines simultaneously. Just go *Xcode -> Xcode Extensions* and install the *AlignmentForXcode* extension. That's much easier to do it with single hotkey press.
I was completely sure, that you already know it, when I did saw your file at 0:42, but I did lost that sureness later, when I did saw as you do it manually on 12:15 and 13:47. And, maybe if you didn't know about the extension, dive into this and tell us about what are the Xcode extensions you found useful
I do it manually. I wasn't aware of that extension. I'll give it a look 😀
Is this “AlignmentForXcode” different than highlighting the text you want to format and pressing ctrl + i ?
thanks for great video
Glad you liked it!
Hi Sean ! if I setup a UI button trigger something inside custom cell class, and use a dequeuereuseable cell inside cellForRowAt indexPath, how to prevent multiple triggers when cell being reuse?
One idea I've used: Add a tag to the button, and check it using a Case switch in your click handler to know which button instance was clicked.
Tags are one way. In my opinion, using a delegate is the cleaner way. I did a video on that - ruclips.net/video/UPrBXUWPf6Q/видео.html
@@larrymcdowell2265 Thanks Larry, I'll try!
when I want to add UIElements Programmatically I Usually do it like this:
let view: UIView = {
let view = UIView()
//Configurations
//
return view
}()
I feel this way everything is more way cleaner.
That's a perfectly fine way to do that. I'm not a fan of that method because I find that the top of my file is all cluttered up with configurations. Just a personal preference.
Custom subviews should be added to the contentView, otherwise addTarget wont work
Please create playlist about this programmatically
Good idea...
Sean can you teach us how to use viewmodel on tableviews. And Learn the term Skinny views fat models.
here is an awesome article I found that that walks you through how to do this! I walked thru the tutorial and added some actual api calls to test it out!
the article -> medium.com/capital-one-tech/smooth-scrolling-in-uitableview-and-uicollectionview-a012045d77f
my implementation -> github.com/ncooke3/MVVMAsyncTableView
You are awesome
Thanks for the kind words!
Heyy, thank you , good stuff, I hope to see more videos without usage of StoryBoard, I really hope you will make more!
Question: Can you explain how to use segue , in code without storyboard, and how to send data from indexPath.row to another ViewController object.
Example: If I have an Custom Button in my cell which will push new ViewController, and I want the content of the cell to be send to some objects in my new ViewController.
Thank you!
Segues don't exist without storyboard. But I'll do a continuation of this showing how to pass data programmatically.
Hi Sean Thanks a ton for all the videos!
I am stuck in 1 of my projects where
I have tableview with customcells and inside the cell i have an image view and i am getting the images from the API and using there but now I want to integrate pinch zoom into it and we want to zoom the whole tableView together not a particular cell at a time.
So the problem I am only able to zoom in the center like you showed in this video but not in corners and all.
And I have text in the image so i want it to zoom inother places also not just in center.
And when i integrate pan gesture for drag then it is not able to scroll through the tableView as it gets confused between grab and scroll and gets stuck at that particular image only, so I can't do that as well.
Can you please guide on how to solve this issue? How to zoom in other parts also not just center???
Hi, i build my tableView exactly like you and it works fantastic. After that i build a second view controller and passed the Data to make a Detail View Controller. I make that with your video „Pass Data Between View Controller“ and it works amazing. But now i have a problem, i would like to make a third view controller and get the information from my DetailView Controller and not from the Table View. But i stuck here and i actually dont know how i can fix this. Have you some tips for me? Best reguards Heinz
Hii
I have 2 questions,
how can we add background image on that..? Not in the table view contents.
2nd, how to make round corners on table view and transparent and add some colour with opacity 50%..?
Please help me..
Thanks 😊
What is the difference between:
1) using tableView.rowHeight in line 24 and
2) using tableView method: func tableView(_ tableView: UITableView,
heightForRowAt indexPath: IndexPath) -> CGFloat
nothing difference
Why do you use Video class and not the struct?
how do you change a specific word in a textview to be clickable and open up another view controller?
Hi Sean, I love your videos and I learned really a lot. But I have no idea how I can create a following view controller when I tapped one of the "video" button in the table view. I saw this in that video from you (iOS 11 Navigation Bar Update) I really hope you can help me :) Thanks
very good video ,
Thanks Walid!
Hello Sean,
Could you please advise, how to include the image and title for the header section using UITableView without storyboard. I am struck with registering the class
Hey Sean, I got a quick question; At the beginning, where you said you setup the file so you delete the file that the app won’t start with storyboard. Am I still able to use storyboards within my app? I have a 5 tabbed bar application, and one of my teammates has been developing in Storyboard before the big switch. Would be a shame to waste the work. In any case, hope you can give insight and Thanks for the video!
Yo great work! just a quick question - how much experience or knowledge should i be having of swift in general before i move to swift UI framework?
A lot. SwiftUI is fun to learn and play with for now... but it's not seriously going to be used in production for a few years. If you're trying to get an iOS dev job within the next 1-2 years... it's almost a certainty that it'll be in UIKIt.
18:29 Hi Allen I'm a beginner, I would like to know if it's possible to implement an action in video1.I also wanted to tell you that i love your videos they are helping me a lot you are an inspiration for me. Thanks for everything good day
In my project I also created a struct of Images and then tried to set msImage type as Images in the struct below
struct MS {
let msImage: Images
let msTitle: String
let msDescription: String
}
after that when I tried to create an array of MS calling images from the Images struct it is giving me an error message as under:
'UIImage' is not convertible to 'Images'. I am unable to fix this. Any idea what's going on ?????
space sensitive.. lol
big like
thanks
Any reason why you chose to do configuration via functions rather than lazy vars with closures?
Personal preference. Both are fine. I like the way the code is laid out and find it easier to reason about that way. But it’s purely subjective.
why is the separator line gone slightly right side..?
This is the default separator on iOS, you can do a custom one anytime.
its not work for me, i dont know maybe because wihtout scene delegate or because im using storyboard
Try this one. It's essentially the same up but using Storyboard. ruclips.net/video/FtO5QT2D_H8/видео.html
are these patreon videos still happening?
could someone tell me where i can find model Video.swift code?
Great video! Would an enum be better for storing cell identifiers?
It can go either way. The downside of a struct is that technically you could initialize an empty "Cells" struct. You'll see people do it both ways, but an enum would be slightly better because you can't initialize an empty one. It's trivial.
I've been having trouble with custom cells not performing segues... I've actually been doing a lot of research and I haven't found a single RUclipsr, create a custom cell, and then perform a segue on it. I don't know if that is just a coincidence or what. But if you can perform segues on those cells can you explain how you are doing it?
a few need to add thing for old version support and some sceneview issue " @available(iOS 11.0,*)
@available(iOS 12.0,*)
func ios12Support(){
self.window = UIWindow(frame: UIScreen.main.bounds)
self.window!.backgroundColor = UIColor.white
self.window!.makeKeyAndVisible()
self.navigationController = UINavigationController(rootViewController: ViewController())
self.window!.rootViewController = self.navigationController
} "
Hi Sean
Great video! i have no errors when i do the code. But when i run it in the simulator it only gets black? The "no storyboard lecture" you did works great, but when i do this tutorial i dosen´t work for me, any idea what i am doing wrong?
Thanks in advance!
Yes, in Xcode 11 and iOS 13, they introduced a new way to remove the storyboard programatically. That's why I made that "No Storyboard" video. You're not doing anything wrong. Xcode just updated the way it does things in Xcode 11 and iOS 13.
Hello, I am having a problem. My app crashes as soon as I initialize the properties on SceneDelegate and I don't know what I am doing wrong. I've already deleted all the references to the main.storyboard but it seems like it's still looking for it.
I saw another of your videos and I found my answer haha Thank you so much!!!
how to disable multiple screen ipad ios 13.0 ?
Wow !
Hey Sean (or anybody reading this comment). I have been struggling with sizing/resizing of my custom controls and I have googled everything I can think of to try and find a good solution - but I have yet to come across a straightforward answer - so as a last resort, I’ve come here looking for help.
I created a custom control that consists of a background label, an image and a few more label overlays. If I initialize it with a specific frame size, it looks great - but if the frame changes after initialization it doesn’t update itself and I have not found a way for the control to be alerted when it’s frame changes so that it can resize all of its sub views appropriately. I am certain there must be a straightforward way to do this - but I haven’t been able to find it - and to work around it, I have been including a function in all of my custom reviews that completely rebuilds all of its constraints and I’ve been calling it much more frequently than I need to in order to make sure that my view is displayed correctly - for example, when my control appears in a collection view - I rebuild all of constraints in the cellforitemat function every time I refresh the collection. I know that’s overkill and kind of defeats the purpose of cell reuse - but I don’t know what the alternative is.
If someone can point me to a solution for this, I would be extremely grateful. Thanks in advance.
@Sean: Sorry to hijack your comments with this question - but even if you’re annoyed with me for it - I doubt you’ll be as mean about it as the folks over at stackoverflow are. (It genuinely seems like they have more members devoted to telling people their questions are stupid than they have members actually willing to provide answers or helpful guidance!)
Did you write the isActivated = true? And disabled auto resize?
Dragos Rachieru No. I’ve never even heard of that setting. Not using storyboard. I think I just need to know the normal way that a UIView is notified that it’s frame has changed - then I can intercept that notification and make sure that all of its subviews are also resized appropriately.
Is there a download for this project
BM - 18:00
Theres probably 200 videos about this, you should do one on SwiftUI views.
He explains why he made the video in the very beginning of the video. Also, there are no other videos on Xcode 11 about this.
Thanks Guitaripod.
@Yixe, SwiftUI is not ready for production. Not even close. UITableView is.
8:50 that's why most people just use SnapKit
Hey, is it possible to add spacing between UITableView rows?
Hi Laurynas, did you find an answer to this?
You probably can use UITableViewController instead of UIViewController.
I find that to be very restrictive.
Sean Allen restrictive, in terms of future change adaptations?
Restrictive like if it's a SUPER basic TableView, then sure. But anything more than a SUPER basic TableView, I don't want to use UITableViewController.
Rashesh, a UTableViewController is tied to the concept of being a fullscreen view. Sometimes, you need a UITableView that only occupies part of a screen. (e.g. you have a banner or some chrome above the tableView). In those cases, you _could_ fudge things so that the UITableView has special sections and rows just for that UI, but it's not a good solution. It's better and easier to create a UITableView manually, and position it exactly where you need it in your view hiearachy.
Source code anywhere?
Does this also work with storyboard?
yes
i need its source code
谢谢你的教程 - 来自中国开发者的问候
Glad it helped!
👏 for func pin
Glad you liked that 😀
source code please