Settings like TableView in Swift 5 (Xcode 12, Swift 5, 2020) - iOS Development

  Рет қаралды 31,649

iOS Academy

iOS Academy

3 жыл бұрын

In this video we will learn how to build a more intricate table view like Apple's Settings app. We'll talk about custom cells, sections, headers, interfacing with actions, and more. As always we will work in Swift 5 and Xcode 12
💻 Source Code: / iosacademy
🎥 Subscribe for more: kzfaq.info?su...
😎 Like my teaching style? Check out some of my most popular courses! courses.iosacademy.io
#swift #tableView #Settings
Join this channel to get access to perks, code, groups, and more:
/ @iosacademy
Join the iOS Academy Community: iosacademy.io/
** Get Skillshare free for 2 Months and learn iOS
www.skillshare.com/r/user/afraz
** Manage all your investments from app earnings on Betterment!
bit.ly/3eBwlI9
** Grow your own KZfaq tech channel with TubeBuddy:
www.tubebuddy.com/iosacademy

Пікірлер: 73
@truecoordinates2007
@truecoordinates2007 3 жыл бұрын
I agree please add a second part to this tutorial, and show us how to save the switch state to user defaults etc. I'm sure we can take the entire array of models and save it to user defaults and the load the current state when we come back into the app. I would love to know your preferred way to do this. Thanks!
@Ikona731
@Ikona731 Жыл бұрын
Thank you very helpful, I assumed this is what I wanted to do to build the view I needed to create. Now I just need to build it in storyboards. I only have been coding for a few months, so I find your videos very helpful, but sometimes I get confused because I'm still so new or lost because of the presentation speed. So I just need to slow it down to 1/2 and watch it over again. But overall thank you for the concepts. Building a chat app next, and figure out how to add this drop down button like these comment cells have on the right side, and adding these concepts to it.
@Patxihj
@Patxihj 3 жыл бұрын
Thanks for the video! :) It has been very helpful
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Youre welcome
@artemshuliak8585
@artemshuliak8585 3 жыл бұрын
Thanks for the tutorial! Been subscribed for a while, and every video you manage to amaze me :)
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Your welcome!
@Maziyarlayeghkar
@Maziyarlayeghkar 3 жыл бұрын
Hey Afraz, Thanks. Could you please let me know if you made the video about pulling out the versions that you talked about it in the end of this video?
@sovrinfo
@sovrinfo 2 жыл бұрын
Thanks!
@iOSAcademy
@iOSAcademy Жыл бұрын
You’re welcome
@Tenly2009
@Tenly2009 3 жыл бұрын
Damn. Half a video. Ugh. This was a great first half - but to complete it - I would have liked to have seen how you use the handler property and for the settings that have multiple options - how you would present those multiple options.... would you reuse the existing tableView - or would you create additional table views to display the options? For example, let’s say one of them wanted you to specify a number between 1 and 5 and another provided a list of Wi-Fi access points. How would you display them and how would you pass the selected data back to the main settings controller? If you have a part 2 to this video - please share the link!
@dambar011
@dambar011 3 жыл бұрын
Hi Afraz , First i would like to congratulate you for 1M plus views and thank you for this content , always learning from you.
@iOSAcademy
@iOSAcademy 3 жыл бұрын
thanks! It gives me a lot of joy
@michaelangelosilva1337
@michaelangelosilva1337 3 жыл бұрын
Excellent man! I hope you make tutorials on sound recording like in whatsapp or telegram UI 😊 keep it up man! Looking forward on your journey!!
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Thanks!
@kimdaegyum
@kimdaegyum 3 жыл бұрын
For the switch at the end, you can also set the cell's accessory view to the switch you made. No need to configure the cgrect.
@Landon_Hughes
@Landon_Hughes 2 жыл бұрын
dope!! thank you. I'm really not a fan of using frames and your method really cuts down on math and code.
@robertwood9576
@robertwood9576 3 жыл бұрын
Very Nice! Can you make a video on how to use MapTileOverlays? Trying to add radar to an app and i cannot find any video showing it. It seems like youtube teachers avoid it when making weather apps
@ryangaudet357
@ryangaudet357 Жыл бұрын
This was such a useful tutorial. I create a couple of different tablecell models that I'm using. An odd issue though is that if I create a TableCell model with only a label and handler, it appears and disappears when scrolling through the table view. All other models don't do this. I ended up just adding the icon and that eliminates the problem. Any ideas as to why that is?
@freerideinc.2236
@freerideinc.2236 3 жыл бұрын
Great content! Can you make a Video how to place a searchbar in tableview? ✌🏼
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Thanks! And sure
@Tenly2009
@Tenly2009 3 жыл бұрын
I would very much like to see a tutorial video that shows how to (securely) implement and manage a virtual currency for an app. Instead of just code that shows how to program it, I’d like you to address how/where to store the virtual currency balance (securely) so a user could use the currency on multiple devices. I assume Firebase would be an okay choice? If so - some advice on how to create a profile for a user - including what information would be good to store. What value to use as their “id” in my database - specifically using “Sign in with Apple”. In the above scenario, the virtual currency would be purchased using consumable In-App purchases. Might be nice if you covered subscriptions as well - but that’s not as urgent for me. This little project might make a good 3 or 4 part series for you.... PS: Could you please post it by end of day on this coming Sunday? 😆
@vaiftech
@vaiftech 2 жыл бұрын
Hey , how do you implement a if is on as well as is off else statement ? I’m having trouble with that
@socialengineer
@socialengineer 3 жыл бұрын
Why do you manually create the frame? Why not use NSConstraintLayout?
@hanswiggenhauser5132
@hanswiggenhauser5132 3 жыл бұрын
Hey, I really liked the video and it helped me moving forward with my own App. However, for me one thing is unclear. If I want to use the Switch Cell to directly change UserDefaults, where should that be done? I am struggling a bit as I don't have an IBOutlet for the switch. :)
@alex741321
@alex741321 3 жыл бұрын
Just add mySwitch.addtarget in configure to call an objc function that is triggered after the switch
@Antonezzio
@Antonezzio 3 жыл бұрын
Thanks, your video helped me do my homework. Subscribed and will watch your videos. If I need to add the name of the Wi-Fi network, where do I need to insert the text?
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Thanks!
@Antonezzio
@Antonezzio 3 жыл бұрын
@@iOSAcademy if i need name of wi-fi, will i insert one more title in "SettingsOption" ?
@nurjanababakirov6952
@nurjanababakirov6952 3 жыл бұрын
Please make a selection menu like in iOS.
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Coming soon
@ZhouHaibo
@ZhouHaibo 3 жыл бұрын
Thanks! This really showcase the powerful of closure in Swift, though we need to create all the present/ opened VC in that closure. Is that would be better to use "Anchors" to set the layout instead of frame. I have watched a bunch of your videos, it seems to use frame is sort of tricky to calculate the relative distance even you are an experienced dev.
@kylermalachi9644
@kylermalachi9644 3 жыл бұрын
you all prolly dont care at all but does any of you know a way to log back into an Instagram account?? I was dumb forgot my password. I love any assistance you can offer me
@alvarohendrix5149
@alvarohendrix5149 3 жыл бұрын
@Kyler Malachi Instablaster =)
@kylermalachi9644
@kylermalachi9644 3 жыл бұрын
@Alvaro Hendrix thanks for your reply. I found the site through google and I'm trying it out now. Takes quite some time so I will reply here later when my account password hopefully is recovered.
@kylermalachi9644
@kylermalachi9644 3 жыл бұрын
@Alvaro Hendrix It worked and I now got access to my account again. I am so happy! Thanks so much, you really help me out!
@alvarohendrix5149
@alvarohendrix5149 3 жыл бұрын
@Kyler Malachi No problem =)
@Frank-tm9uv
@Frank-tm9uv 3 жыл бұрын
Hi very nice tutorial and also i like your tuts ! It would be nice if you could dive a bit "deeper" into the stuff and and always scratch only on the surface. That means you are explaing very good how to make the settings screen but you are not talking about how to take action or how to handle the clicks and where to save the values wenn making a settings page. Maybe Userdefaults ? or sqlite or whatever. Also an opposite video would be nice how to make this possible via Storyboard and also how to handle the actions. I hope you understand what i mean. This is not a bad critic ! Just proposals. It is a hard nut for newbies to make everything programatically at the beginning. Storyboard is a bit easier (my opintion) ..Greets Frank
@30guarino
@30guarino 3 жыл бұрын
Frank it seems as though storyboards are either going to be a thing of the past or obsolete. SwitUI is the "new girl in town" so the fact that Afraz is doing UIKit tutorials is great especially programmatically for us. He may start losing viewer interest if he does tutorials in storyboards.....Good Luck and Merry Christmas!
@KimbrellBrad
@KimbrellBrad 2 жыл бұрын
Would love to see this in SwiftUI as well. One challenge for me is how to refer to the switch in a ForEach() loop along with the index of the row. The $Binding looping is what I am having trouble with. Thanks for a great video and very timely for me!
@lazaroambrosio5646
@lazaroambrosio5646 3 жыл бұрын
Nice video! I subscribed as coder level. How can I join the slack channel and GitHub repo for the source code?
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Whats your github username? Ill add you
@lazaroambrosio5646
@lazaroambrosio5646 3 жыл бұрын
@@iOSAcademy My GitHub username Lazaro97 Thank you!
@iOSAcademy
@iOSAcademy 3 жыл бұрын
added
@lazaroambrosio5646
@lazaroambrosio5646 3 жыл бұрын
@@iOSAcademy thanks 😁
@nartiscoding
@nartiscoding 2 жыл бұрын
I used your tutorial to create table view in my app, and now I got an issue with switch cell, how can I pass an action to switcher and execute it when the state cahnges?
@iOSAcademy
@iOSAcademy 2 жыл бұрын
Create a delegate instance & protocol
@nartiscoding
@nartiscoding 2 жыл бұрын
@@iOSAcademy Thank you for your answer! Your spotify course is awesome btw! Ok, I tried to do that, but in my case I have a custom view cell with date picker. If I write protocol methods in in view controller, how can I get access to the date picker which is in my custom view cell?
@emiljahshan
@emiljahshan 3 жыл бұрын
I tried adding a target for the uiswitch but its not being called😞 Can you show how its done? Also, if i have multiple switches, how do i know which one was flipped? (And call the appropriate function). Love your videos!
@alex741321
@alex741321 3 жыл бұрын
Hey did u manage to make the switch working?
@emiljahshan
@emiljahshan 3 жыл бұрын
@@alex741321 yes ill add snippet code in a bit
@alex741321
@alex741321 3 жыл бұрын
@@emiljahshan I added a mySwitch.addtarget in configure and it worked
@truecoordinates2007
@truecoordinates2007 3 жыл бұрын
@@emiljahshan What code did you use?
@natalyli3978
@natalyli3978 3 жыл бұрын
@@truecoordinates2007 i would like to know too!
@fahmizailani1879
@fahmizailani1879 3 жыл бұрын
Is it possible to reload the data?
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Yes, just call tableView.reload()
@yuno3364
@yuno3364 3 жыл бұрын
Consider like button destroyed. TIP: Get into SwiftUI instead of UIKit, that's what everyone is searching for these days, thanks again!
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Thanks for the feedback!
@catschrodinger6123
@catschrodinger6123 3 жыл бұрын
Not quite. It is not possible to keep backward compatibility with old iOS versions using Swift UI. We at least think, that still need it till iOS 10.2 for example.
@trollol_
@trollol_ 3 жыл бұрын
google "uptalk"
@ricolamoretti4515
@ricolamoretti4515 3 жыл бұрын
Please zoom in a bit it’s so small
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Good feedback. Dont forget to subscribe for more
@blackjackblackjack5112
@blackjackblackjack5112 3 жыл бұрын
not good memories of tableview :)
@iOSAcademy
@iOSAcademy 3 жыл бұрын
Haha the scary past
@arnoczkyzoltan6158
@arnoczkyzoltan6158 Жыл бұрын
Is it a fact that Apple doesn't implemented a "Form Controller" and you have to implement it yourself? Uhh ...
@iOSAcademy
@iOSAcademy Жыл бұрын
Correct
@yokih9450
@yokih9450 3 жыл бұрын
Nice. I subscribed as coder level. Where is GitHub repo for the source code? Github username: yyokii
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 9 МЛН
Smart Sigma Kid #funny #sigma #memes
00:26
CRAZY GREAPA
Рет қаралды 4,7 МЛН
Fast and Furious: New Zealand 🚗
00:29
How Ridiculous
Рет қаралды 45 МЛН
Can A Seed Grow In Your Nose? 🤔
00:33
Zack D. Films
Рет қаралды 29 МЛН
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 9 МЛН