UITableView Tutorial w/ Custom Cells - Programmatic - Swift 5 - Xcode 11

Поделиться
HTML-код
  • Опубликовано: 4 сен 2024

Комментарии • 175

  • @seanallen
    @seanallen  4 года назад +1

    Watch Next - iOS Take Home Project - Job Interview Practice - Free Preview - ruclips.net/video/MSIe2y6Fee8/видео.html

  • @oomten10
    @oomten10 2 года назад +8

    I just can't express how I grateful for this tutorial! You are amazing!

    • @seanallen
      @seanallen  2 года назад

      Happy to hear it was helpful!

  • @natelehoux7604
    @natelehoux7604 4 года назад +12

    Best programmatic table setup tutorial I've found. Awesome job explaining the details!

    • @seanallen
      @seanallen  4 года назад

      Glad it was helpful!

  • @ralphGabbbbbb
    @ralphGabbbbbb 4 года назад +4

    From a 6 year experience Android developer, this is a very informative tutorial. Swift is really kinda like a brother to Kotlin. Cheers

    • @seanallen
      @seanallen  4 года назад +1

      Yes, Kotlin and Swift are pretty similar. Glad you found it helpful!

    • @dragossusi
      @dragossusi 4 года назад

      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)

  • @jasonchan6273
    @jasonchan6273 4 года назад +2

    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!

    • @seanallen
      @seanallen  4 года назад

      Thanks for the kind words, Jason!

  • @TheTruthSentMe
    @TheTruthSentMe 5 лет назад +1

    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.

    • @seanallen
      @seanallen  5 лет назад

      That's great to hear. Glad it was helpful 😀

  • @noamif
    @noamif 4 года назад

    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!

    • @seanallen
      @seanallen  4 года назад

      Happy to help, Noam 😀. If that's the case you'll probably love my courses at seanallen.co. (shameless plug 😂)

  • @KevinFi747
    @KevinFi747 4 года назад +4

    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.

    • @seanallen
      @seanallen  4 года назад

      Thanks Kevin! Glad you enjoyed the video and that you learned from it 😀

  • @justingoody3624
    @justingoody3624 4 года назад +2

    Dude, this is brilliant! now i understand UITableView.

    • @seanallen
      @seanallen  4 года назад

      Happy it was helpful, Justin!

  • @dawei84_dev
    @dawei84_dev Год назад +1

    Hi Sean, I would say this tutorial has definitely helped me a lot!

  • @Chavalk
    @Chavalk Год назад +1

    Great video! Thanks a lot Sean!

    • @seanallen
      @seanallen  Год назад +1

      Glad you enjoyed it, Jose!

  • @zoma128
    @zoma128 5 лет назад +1

    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

    • @seanallen
      @seanallen  5 лет назад +1

      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.

    • @zoma128
      @zoma128 5 лет назад +1

      @@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

  • @LetsBuildThatApp
    @LetsBuildThatApp 5 лет назад +14

    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.

    • @walidelzo1
      @walidelzo1 5 лет назад +1

      we all learn from you . you are awesome programmer

    • @seanallen
      @seanallen  5 лет назад +3

      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

    • @TokyoXtreme
      @TokyoXtreme 5 лет назад

      @@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.

  • @gmostafaali
    @gmostafaali 3 года назад

    I always love to do programmatically. You are great Sean.

  • @AliAljoubory
    @AliAljoubory 5 лет назад +2

    Yo I had no idea about that snippets feature that's so damn cool.

  • @gakkieNL
    @gakkieNL 5 лет назад +1

    Great seeing you do these tutorials again... Nice bedtime leisure to me ;)

  • @zippytoad507
    @zippytoad507 3 года назад

    I do like the programmatic style. Thanks mate!

  • @AdailtonSilvaSP
    @AdailtonSilvaSP Год назад

    Sean, Tks for this video!! it was very helpful to me!!!

  • @StewartLynch
    @StewartLynch 5 лет назад

    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.

  • @szymontamborski7542
    @szymontamborski7542 4 года назад +1

    Is there any video showing how to push diffrent UIViewController depends on which cell is pressed, programatically?

  • @jaymartinez311
    @jaymartinez311 4 года назад

    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.

  • @Eugene.Berezin
    @Eugene.Berezin 5 лет назад +1

    “VideoListVC this is what you see” you almost caught some rap there , Sean lol 😂

    • @seanallen
      @seanallen  5 лет назад

      Don't sleep on my flow...

  • @youarehere1716
    @youarehere1716 2 года назад +1

    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.

  • @reemotto
    @reemotto 2 года назад

    Thanks for the lessons Sean, it's really helps me! 😉

  • @dinishatennakoon
    @dinishatennakoon 4 года назад +1

    This was really helpful!! Thanks alot!

    • @seanallen
      @seanallen  4 года назад

      Glad you enjoyed it, Dinisha!

  • @jerrick.warren
    @jerrick.warren 5 лет назад +1

    Perfect timing. Thanks!!

    • @seanallen
      @seanallen  5 лет назад

      Happy to help, Jerrick!

  • @parkeramundsen7052
    @parkeramundsen7052 5 лет назад +1

    Great video! Could you do a similar style video about programmatically using UINavigation controller?

  • @30guarino
    @30guarino 4 года назад

    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!

    • @seanallen
      @seanallen  4 года назад

      This is a good idea, David. I'll implement this in future videos. Thanks for the suggestion 😀

  • @wenjuanwang4387
    @wenjuanwang4387 3 года назад

    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

  • @Jngrowdon
    @Jngrowdon 3 года назад

    Sean - great video! Thanks!

  • @Lilpiip123
    @Lilpiip123 5 лет назад +2

    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

    • @seanallen
      @seanallen  5 лет назад +1

      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.

    • @chrispy104k
      @chrispy104k 5 лет назад

      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.

    • @danielwatson6529
      @danielwatson6529 5 лет назад

      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

  • @BryantRicart
    @BryantRicart 4 года назад +1

    You are a genius! Great video.

    • @seanallen
      @seanallen  4 года назад

      Happy to help, Bryant 😀

  • @swiftynuke9032
    @swiftynuke9032 5 лет назад +4

    I love you man you always help us
    And I today is my birthday

    • @seanallen
      @seanallen  5 лет назад +1

      Happy to help. Happy Birthday!

  • @TheSpiralnotizblock
    @TheSpiralnotizblock 3 года назад

    Do you have a video in depth of this part 16:45? The short explanation was also very helpful!

  • @andreysilver5496
    @andreysilver5496 5 лет назад +1

    very good stuff. Thank you.

  • @zivzalzstein3776
    @zivzalzstein3776 2 года назад

    great video, I just have one question. why the helper functions of the custom cell constraints are not called from didLayoutSubViews()?

  • @natehedgeman
    @natehedgeman 3 года назад +1

    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.

  • @mmatyjaszczyk21
    @mmatyjaszczyk21 4 года назад +1

    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

    • @seanallen
      @seanallen  4 года назад

      For this basic TableView, that would work. However, I've found UITableViewController to be very limiting, which is why I always create my own.

  • @nimalead66
    @nimalead66 2 года назад

    What a great Video!!!

  • @kittiesandbeer
    @kittiesandbeer 3 года назад

    The beginner auto layout constraints is set to private, do you have an alternate video?

  • @darthramen8328
    @darthramen8328 3 года назад

    This saved my life

  • @dallasgreen85
    @dallasgreen85 5 лет назад +2

    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?

    • @seanallen
      @seanallen  5 лет назад

      Good question. I'm not sure off the top of my head. I'd have to look into that.

    • @w0mblemania
      @w0mblemania 5 лет назад +1

      @@seanallen Andre is correct.

    • @ArnsEnglander
      @ArnsEnglander 4 года назад

      @@w0mblemania why is that?

    • @w0mblemania
      @w0mblemania 4 года назад +1

      @@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.

  • @amuse_me
    @amuse_me 2 года назад

    Perfect. thanks!!!

  • @leticiaf.3808
    @leticiaf.3808 3 года назад

    Thanks Sean! 🧡

  • @memofigueredo6931
    @memofigueredo6931 5 лет назад +1

    Good video sean thank

  • @GrandAmericaMotorcycleRides
    @GrandAmericaMotorcycleRides 3 года назад +2

    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!

    • @seanallen
      @seanallen  3 года назад

      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.

  • @mdtarifkhan1825
    @mdtarifkhan1825 2 года назад

    how to trim and crop video ? sir, please create a tutorial.

  • @mohammadakbari5506
    @mohammadakbari5506 5 лет назад

    Please talk about RXswift and combine
    Tnx for this video...

  • @nn7980
    @nn7980 4 года назад +2

    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.. .

    • @seanallen
      @seanallen  4 года назад +1

      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.

  • @ftmtrading2966
    @ftmtrading2966 Год назад

    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?

  • @jmstajim
    @jmstajim 5 лет назад +3

    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!

    • @seanallen
      @seanallen  5 лет назад +1

      Every team is going to be different. I have no experience with coordinators and VIPER.

  • @user-yk4jr4gx1s
    @user-yk4jr4gx1s 2 года назад

    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?

  • @vladimirkuzomenskyi9660
    @vladimirkuzomenskyi9660 4 года назад +1

    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

    • @seanallen
      @seanallen  4 года назад

      I do it manually. I wasn't aware of that extension. I'll give it a look 😀

    • @Tenly2009
      @Tenly2009 4 года назад

      Is this “AlignmentForXcode” different than highlighting the text you want to format and pressing ctrl + i ?

  • @user-tq4fv8ie6q
    @user-tq4fv8ie6q 5 лет назад +1

    thanks for great video

  • @evankohi5076
    @evankohi5076 5 лет назад +2

    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?

    • @larrymcdowell2265
      @larrymcdowell2265 5 лет назад +1

      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.

    • @seanallen
      @seanallen  5 лет назад

      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

    • @evankohi5076
      @evankohi5076 5 лет назад

      @@larrymcdowell2265 Thanks Larry, I'll try!

  • @azhmanadam7311
    @azhmanadam7311 4 года назад

    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.

    • @seanallen
      @seanallen  4 года назад

      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.

  • @robtea3941
    @robtea3941 Год назад

    Custom subviews should be added to the contentView, otherwise addTarget wont work

  • @muhammadisfanfajar7125
    @muhammadisfanfajar7125 5 лет назад

    Please create playlist about this programmatically

  • @eddwinpaz
    @eddwinpaz 5 лет назад

    Sean can you teach us how to use viewmodel on tableviews. And Learn the term Skinny views fat models.

    • @monsterbluegill
      @monsterbluegill 5 лет назад

      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

  • @mracipayam
    @mracipayam 5 лет назад +3

    You are awesome

    • @seanallen
      @seanallen  5 лет назад

      Thanks for the kind words!

  • @kamkoamoh
    @kamkoamoh 5 лет назад

    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!

    • @seanallen
      @seanallen  5 лет назад

      Segues don't exist without storyboard. But I'll do a continuation of this showing how to pass data programmatically.

  • @persistent-s
    @persistent-s Год назад

    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???

  • @heinzschweitzer7123
    @heinzschweitzer7123 4 года назад +1

    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

  • @67Diadem
    @67Diadem 3 года назад

    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 😊

  • @nileshjdarji
    @nileshjdarji 5 лет назад

    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

    • @7mach
      @7mach Год назад +1

      nothing difference

  • @pgc6240
    @pgc6240 4 года назад

    Why do you use Video class and not the struct?

  • @darrienhuntley9134
    @darrienhuntley9134 4 года назад

    how do you change a specific word in a textview to be clickable and open up another view controller?

  • @heinzschweitzer7123
    @heinzschweitzer7123 4 года назад

    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

  • @walidelzo1
    @walidelzo1 5 лет назад +1

    very good video ,

  • @pskabilan
    @pskabilan 4 года назад

    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

  • @datdoesthings
    @datdoesthings 4 года назад

    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!

  • @khawarshehzad487
    @khawarshehzad487 5 лет назад +1

    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?

    • @seanallen
      @seanallen  5 лет назад +3

      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.

  • @nokrato
    @nokrato 4 года назад

    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

  • @nileshjdarji
    @nileshjdarji 4 года назад +1

    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 ?????

  • @diakojafari2107
    @diakojafari2107 2 года назад

    big like
    thanks

  • @abdulrapidz
    @abdulrapidz 5 лет назад

    Any reason why you chose to do configuration via functions rather than lazy vars with closures?

    • @seanallen
      @seanallen  5 лет назад

      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.

  • @user-bb8gv9zt1b
    @user-bb8gv9zt1b Год назад

    why is the separator line gone slightly right side..?

    • @codewithalx
      @codewithalx 11 месяцев назад

      This is the default separator on iOS, you can do a custom one anytime.

  • @BranGaming20
    @BranGaming20 4 года назад

    its not work for me, i dont know maybe because wihtout scene delegate or because im using storyboard

    • @seanallen
      @seanallen  4 года назад

      Try this one. It's essentially the same up but using Storyboard. ruclips.net/video/FtO5QT2D_H8/видео.html

  • @tny7390
    @tny7390 3 года назад

    are these patreon videos still happening?

  • @fattoofittoo7907
    @fattoofittoo7907 Год назад

    could someone tell me where i can find model Video.swift code?

  • @await-rescue
    @await-rescue 5 лет назад

    Great video! Would an enum be better for storing cell identifiers?

    • @seanallen
      @seanallen  5 лет назад

      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.

  • @natehedgeman
    @natehedgeman 3 года назад

    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?

  • @sanglin9387
    @sanglin9387 4 года назад

    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
    } "

  • @gustavaberg6951
    @gustavaberg6951 4 года назад

    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!

    • @seanallen
      @seanallen  4 года назад

      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.

  • @RitaDeCassia-om5fq
    @RitaDeCassia-om5fq 4 года назад

    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.

    • @RitaDeCassia-om5fq
      @RitaDeCassia-om5fq 4 года назад

      I saw another of your videos and I found my answer haha Thank you so much!!!

  • @houssemmimoun2079
    @houssemmimoun2079 4 года назад

    how to disable multiple screen ipad ios 13.0 ?

  • @NotoriousGarage
    @NotoriousGarage 3 года назад

    Wow !

  • @Tenly2009
    @Tenly2009 4 года назад

    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!)

    • @dragossusi
      @dragossusi 4 года назад

      Did you write the isActivated = true? And disabled auto resize?

    • @Tenly2009
      @Tenly2009 4 года назад

      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.

  • @whatsapptext-8766
    @whatsapptext-8766 4 года назад

    Is there a download for this project

  • @siva-subramaniam-v
    @siva-subramaniam-v Год назад

    BM - 18:00

  • @yixe2253
    @yixe2253 5 лет назад +5

    Theres probably 200 videos about this, you should do one on SwiftUI views.

    • @guitaripod
      @guitaripod 5 лет назад +2

      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.

    • @seanallen
      @seanallen  5 лет назад

      Thanks Guitaripod.

    • @w0mblemania
      @w0mblemania 5 лет назад

      @Yixe, SwiftUI is not ready for production. Not even close. UITableView is.

  • @stormwaker
    @stormwaker 3 года назад

    8:50 that's why most people just use SnapKit

  • @laurynaskapacinskas8008
    @laurynaskapacinskas8008 4 года назад

    Hey, is it possible to add spacing between UITableView rows?

    • @mrmillmill
      @mrmillmill 3 года назад

      Hi Laurynas, did you find an answer to this?

  • @rasheshbosamiya1482
    @rasheshbosamiya1482 5 лет назад

    You probably can use UITableViewController instead of UIViewController.

    • @seanallen
      @seanallen  5 лет назад +1

      I find that to be very restrictive.

    • @rasheshbosamiya1482
      @rasheshbosamiya1482 5 лет назад

      Sean Allen restrictive, in terms of future change adaptations?

    • @seanallen
      @seanallen  5 лет назад

      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.

    • @w0mblemania
      @w0mblemania 5 лет назад +1

      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.

  • @lampreynetworks
    @lampreynetworks 4 года назад

    Source code anywhere?

  • @NicolaasMigliore
    @NicolaasMigliore 3 года назад

    Does this also work with storyboard?

  • @user-mx6wc4cy1s
    @user-mx6wc4cy1s Месяц назад

    i need its source code

  • @user-yw1mm5qi7d
    @user-yw1mm5qi7d 5 лет назад +1

    谢谢你的教程 - 来自中国开发者的问候

  • @dannylones2159
    @dannylones2159 5 лет назад +1

    👏 for func pin

    • @seanallen
      @seanallen  5 лет назад

      Glad you liked that 😀

  • @jamilamini7807
    @jamilamini7807 4 года назад

    source code please