you're a great programmer, and teacher, I am an IOS Engineer and I still come to see your videos as day one, and still buying your pay courses I can say they were a great assets for me getting my IOS Engineering JOB a few years back, even when I have a computer sciences degree. thank you a lot for all your hard work.
You are the person who created the most worthy video, which explains all important topics in very less time. You really focus on the main content and fundamentals. Watching your videos is just like watching any suspense Hollywood movie where you can't miss even single line else you will lose the content. Great Job Brian Voong!!
I can't believe it. Your videos are so on point man. Great job. Every single time you focus on the most important aspects of the swift development. I am so grateful that I subscribed to your channel from the beginnings. I have learned a lot of stuff and I can't imagine how important is your content for me and for sure for everybody. Keep up working because I am sooooo sure that you will hit us with much more than you have accomplished till now :))
Thank you, Brian! I really enjoy the more advanced tutorials that you did in the past few weeks. I realized how much I repeat myself in my code and this will help me streamline my code by a lot.
Thanks a lot Brian I have many sources to learn iOS development but you’re one of the top instructors. Your goals and FAQ for the channel are exactly what keeps me coming back to your videos. Great work as usual.
Just got this implemented in my project! My preference is to name T and U, Cell and Entity respectively though. More clear to me. I was getting pretty fed up with the longgg collection view controller code, good to abstract away this stuff, so it will be easier to make list views. Thanks so much Brian!
A pretty complex part of programming, but this is exactly what I want to start using from now on. Thanks for the clear explanation of how this works :-)
Love the video Brian! Really trying to advance myself from Mid to Senior level developer and Generics has always been something I "will get around too" but this was a great video! Really opened my eyes up to the power of Generics!
This is really nice, Brian. Thank you so much. I looked at lots of articles and videos about generics and this video really helped me understand it. Thank you again.
I always appreciate how you start off with "I hope you're having a great day." Let me tell you Brian... I am having an awesome day. Hope you have a great day too!
Needed this Brian thanks, I had a few tableviews that held different products and I tried to to make a base tableview because I new it was bad to repeat myself but didn't know how to get around registering and dequeuing different cells then like always Brian comes to the rescue
That is an awesome video! But I have a question. What if we have multiple TableViews in a single view controller and multiple custom cells in a single TableView ?
superb demo about generics in Swift. I have the used the same but in my app the UITableDatasource model data are different but having same structure. How to use generics for UITableDatasource.
Omg Brian you’re making me a more advanced Developer by the day! Can’t express my appreciation enough in one comment, but I hope u know that!!! Can u do a vid about what parts of IOS you can specialize in? I want to become an expert IOS Developer, and I am pretty good, but I want a part of the SDK which is MY part. A part that I know like my own room. What does employers want?
You started making videos about generics at the right time for me. I learned a lot from you. The only thing that I don't like is when you start making a lot of classes in the same file because it sometimes gets messy and confusing. Also, why don't you close the inspector pane? :) Anyway, I think your channel is the best place to learn advanced iOS development.
Adin Ćebić i think he is creating in same.viewcontroller only 4 video purpose because it will good for us. If we forgot some variable reference then we can easily identify them if it is in same viewcontroller.
Amazing application abs super cool lesson where you use a a generic to be applied as parameter in another generic. This made things so super clear. Also happy 4th Brain! 🇺🇸
Hey Brian, I know this is an old vid but it's super helpful! Could the logic be applied for a table view with different cell types each with their own data source? Thanks!
I would use a different technique of providing the tableview with a view model/datasource of cells and items. You can dig through LBTAComponents to see how this is done.
late reply, but u can probably just morph the daya into a nested array ex: [[cell, cell,cell], [cell, cell]]. Where the arrays.count represents the number of sections and array[i].count represents the number of rows.
Lets say I have a thumbnail and a list cell which render the same item array. Using generics, how would I register both cells? And also by clicking a button in the UI change the type of cell which should be displayed to toggle list view or thumbnail view. Hope that makes sense
Hi Brian, Many thanks for this informative tutorial. I am, however, struggling with figuring out this method with sections I've set up my sectioning as below; enum AccountSections { case account ...etc } enum AccountRow { case login ...etc } struct AccountSection { var section: AccountSections var accountRow: [AccountRow] } If you could, can you please point me in the right direction. Many thanks.
Question: How can I implement header into this. Not all tableview would have header but when I want do have header how do I modify this generic base table view class?
Hi Brian, thanks for such wonderful video. I have a doubt that is in place of having the fixed data source. I wanna use fetch results controller to display my core data object.... How can we use generic cell example in that case... Thanks in advance
Thanks for the reply Brian.. my intention of using the fetch result controller was to use the delegates of fetch results controller, that would avoid complete reload of table view after initial data source has been loaded.
Thank you for interesting topics, but I am little confused. I heard a lot that you should not update view from itself and view must not know about any model. But you set data in view on itself. Is this correct way? It's not critics, I am just really interested in learning.
Yes, there are many different architectures you can choose from. This video is simply showing you the plumbing that can be put in place using Generics. You can modify the logic here to fit whatever model you're looking for.
Hi Brian, awesome video as always. Really like your teaching style. BTW, is it possible to use generics to handle problems like one collection view using multiple types of cell. For example, a collection view has dogCells, CatCells or birdCells. Currently, I use an array to store all cellIdentifier and writing a bunch of downcasting or class checking code, which is pretty annoying. Or maybe there is any better solution? Thank you so much.
I was a little curious about the multiple cell scenario, I think its best to simply use a custom initializer that takes in an array of cell classes: class MultipleCellTableVC: UITableViewController { let cellClasses: [BaseCell.Type] var items = [Any]() init(cellClasses: [BaseCell.Type]) { self.cellClasses = cellClasses super.init(nibName: nil, bundle: nil) cellClasses.forEach { (c) in let className = NSStringFromClass(c) tableView.register(c, forCellReuseIdentifier: className) } } //Override this in your subclass func cellClassName(for indexPath: IndexPath) -> String { let cellClass = cellClasses[indexPath.section] return NSStringFromClass(cellClass) } override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return items.count } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let identifier = cellClassName(for: indexPath) let cell = tableView.dequeueReusableCell(withIdentifier: identifier, for: indexPath) as! BaseCell cell.item = items[indexPath.row] return cell } required init?(coder aDecoder: NSCoder) { fatalError() } }
Great stuff Brian!. Would you be able to do a short video walking through this code? I am still getting my head around generics and seeing it in action would really help. Thank you
For multiple cell types in 1 collection view you can also try IGListKit. It's pretty nice! Only draw back is you'd have to use class instead of struct for your model.
If you wanted to register multiple cells for a BaseTableVC generically would it make sense to make create BaseCells as an Array or a dictionary with [cellId:BaseCell]
For multiple cell types, I believe you could use a Generic Cell Class Array for BaseTableVC. For the identifiers, you could use a simple trick of registering cells with the actual class name. Its even MORE advanced, but maybe I'll go over this trick one day.
Lets Build That App what’s the reason for using a seperate cellId for a cell instead of just using the class name as a string? It seems like the latter is more simple
I’m assuming this approach wouldn’t work if you have different UI Elements in each cell? For example you have two uiviewcontrollers, the first shows uitableviewcells that have a uiimage and uilabel, and the other cell has 2 uiimages. How would you configure each one using generics? Would they have to have the same elements?
I did with both collectionView and tableview. To create Generic collection view you have to implement a little more code but it gives us more flexibility : ~~~~~~~~~~~~~~~~~ - setup in didFinishLaunchingWithOptions method the fallowing code : ~~~~~~~~~~~~~~~~~ let layout = UICollectionViewFlowLayout() layout.scrollDirection = .vertical window.rootViewController = SomeController(collectionViewLayout: layout) ~~~~~~~~~~~~~~~~~ - create custom textLabel (or whatever you want) and do not forget to add it as cell subview and align it inside the cell: ~~~~~~~~~~~~~~~~~~~~~~~~ class CatCell: BasicCollectionCell { let myLabelText: UILabel = { // created custom label let label = UILabel() return label }() override func layoutSubviews() { super.layoutSubviews() backgroundColor = .red addSubview(myLabelText) // added to superview myLabelText.fillSuperView() // set constraints to its superview } override var cellItem: Cat! { didSet { myLabelText.text = cellItem.name } } } ~~~~~~~~~~~~~~~~~ - conform your BaseCollecitonView clase to UICollectionViewDelegateFlowLayout protocol, and setup the sizeForItemAt method whatever you want: ~~~~~~~~~~~~~~~~ func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { return CGSize(width: collectionView.frame.width, height: 50) } The rest of the code is the same as our BRILIANT TEACHER did in this video tutorial, obviously you have to implement numberOfItemsInSection & cellForItemAt exactly in the same way as Brian teach us. PS: By the way, great stuff Brian !!!
Hi Brian, Can you please help, I am trying to create a Generic ViewController with some static functions so I don't need to retype them in all my ViewControllers. It compiles but it crashes every time class GenericViewController : UIViewController { override func viewDidLoad() { super.viewDidLoad() }
static func storyboardInstance() -> T? { let s = String.init(describing: self) let storyboard = UIStoryboard(name: s, bundle: nil) return storyboard.instantiateInitialViewController() as? T } } class welcomeScreen : GenericViewController { }
Hey Brian, really good video as usual. But I don't think that putting the model directly in your UITableViewCell/UICollectionViewCell subclass is a good idea. Sure it's a convenient and fast way for configuring the cell but you should extract that to another object because the view should't be aware of the model. Here is an excellent resource: www.swiftbysundell.com/posts/preventing-views-from-being-model-aware-in-swift Cheers
Yep there are a ton of more advanced architecture patterns that you can apply here. From the code we've seen in this video, you can modify the dequeue process to do whatever you please with the generic cell class. Feel free to expand on the logic here. Remember I'm only showing the way, the destination is yours.
Are you for hire for IOS App dev? Looking for a complex new social media app. Combines many of the aspects that many of the most popular apps have today all into one.
you're a great programmer, and teacher, I am an IOS Engineer and I still come to see your videos as day one, and still buying your pay courses I can say they were a great assets for me getting my IOS Engineering JOB a few years back, even when I have a computer sciences degree. thank you a lot for all your hard work.
You are the person who created the most worthy video, which explains all important topics in very less time. You really focus on the main content and fundamentals. Watching your videos is just like watching any suspense Hollywood movie where you can't miss even single line else you will lose the content. Great Job Brian Voong!!
I can't believe it. Your videos are so on point man. Great job. Every single time you focus on the most important aspects of the swift development. I am so grateful that I subscribed to your channel from the beginnings. I have learned a lot of stuff and I can't imagine how important is your content for me and for sure for everybody. Keep up working because I am sooooo sure that you will hit us with much more than you have accomplished till now :))
I think I finally understand this video after literally watching it a dozen times.
one of the greatest explanation over generics i ever got.
OMG, thank you so much, i was looking for how to make my code more universal, now i'm in love with generics!)
Thank you, Brian!
I really enjoy the more advanced tutorials that you did in the past few weeks.
I realized how much I repeat myself in my code and this will help me streamline my code by a lot.
Thanks a lot Brian I have many sources to learn iOS development but you’re one of the top instructors. Your goals and FAQ for the channel are exactly what keeps me coming back to your videos. Great work as usual.
You are such a powerful instructor. Thank you.
I think this video raised my IQ by like, 5 points
Oh yes thank you Brian! I knew what was generics but didn't know where to use them so here they are 🎉
That was intense- Challenging concept once in a while. Thank you
Just got this implemented in my project! My preference is to name T and U, Cell and Entity respectively though. More clear to me.
I was getting pretty fed up with the longgg collection view controller code, good to abstract away this stuff, so it will be easier to make list views. Thanks so much Brian!
A pretty complex part of programming, but this is exactly what I want to start using from now on. Thanks for the clear explanation of how this works :-)
Awesome, if anything just seeing the syntax in action should make all of us curious what else we can do with Generics.
Now it's make sense to make generic custom boiler plate codes on Xcode :)
You are great man.
Thanks!
Love the video Brian! Really trying to advance myself from Mid to Senior level developer and Generics has always been something I "will get around too" but this was a great video! Really opened my eyes up to the power of Generics!
This is really nice, Brian. Thank you so much. I looked at lots of articles and videos about generics and this video really helped me understand it. Thank you again.
I always appreciate how you start off with "I hope you're having a great day." Let me tell you Brian... I am having an awesome day. Hope you have a great day too!
Needed this Brian thanks, I had a few tableviews that held different products and I tried to to make a base tableview because I new it was bad to repeat myself but didn't know how to get around registering and dequeuing different cells then like always Brian comes to the rescue
Love it!! Please keep the advanced swift videos coming!
Another great video!!! Would you please add to this sequence handling multiple UITableViewCell's?
The lesson is wonderful, I wish you make another lesson as a new example on the same subject
That is an awesome video! But I have a question. What if we have multiple TableViews in a single view controller and multiple custom cells in a single TableView ?
Thanks for the video. VERY VERY helpful! Now I'm going back to my production apps to fix all those code duplication!
Absolutely fantastic !!!!
I'm going to implement this right away.
Thanks !!
Brian you save my day over and over again !!
Thanks for your videos : D
Bless from Taiwan 🇹🇼
superb demo about generics in Swift. I have the used the same but in my app the UITableDatasource model data are different but having same structure. How to use generics for UITableDatasource.
Great video sir..btw How would i handle button target or callbacks in cell for row ?
Omg Brian you’re making me a more advanced Developer by the day! Can’t express my appreciation enough in one comment, but I hope u know that!!! Can u do a vid about what parts of IOS you can specialize in? I want to become an expert IOS Developer, and I am pretty good, but I want a part of the SDK which is MY part. A part that I know like my own room. What does employers want?
wow that's awesome! thanks for sharing your best practices
You started making videos about generics at the right time for me. I learned a lot from you. The only thing that I don't like is when you start making a lot of classes in the same file because it sometimes gets messy and confusing. Also, why don't you close the inspector pane? :)
Anyway, I think your channel is the best place to learn advanced iOS development.
Adin Ćebić i think he is creating in same.viewcontroller only 4 video purpose because it will good for us. If we forgot some variable reference then we can easily identify them if it is in same viewcontroller.
Exactly correct. Recording a video and going back and forth between multiple files would drive everyone crazy.
Thanks,
You can rid the second generic parameter, and instead, you can set the let items: BaseCell.U type for items in BaseViewController
Do you have any code for this?
Amazing application abs super cool lesson where you use a a generic to be applied as parameter in another generic. This made things so super clear.
Also happy 4th Brain! 🇺🇸
Hey Brian, I know this is an old vid but it's super helpful! Could the logic be applied for a table view with different cell types each with their own data source? Thanks!
This reminded me of the time when i was trying to make sense of protocols and delegates.
Real good explanation! thank you Brian.
Hi Brian
You saved my times in this episode
love it
Thanks
Wonderful tutorial
Love it, now I wonder how would you (or anyone here) allow for multiple cells to be registered?
I would use a different technique of providing the tableview with a view model/datasource of cells and items. You can dig through LBTAComponents to see how this is done.
ahh thank you! I might actually give your pod a try!
Hi Brian, I was wondering if there is a way to introduce multiple different sections in the UITableViewController with different generic cell types?
late reply, but u can probably just morph the daya into a nested array ex: [[cell, cell,cell], [cell, cell]]. Where the arrays.count represents the number of sections and array[i].count represents the number of rows.
Awesome, that's what I'm looking for, thank you so much
Thanks Brain your a very good teacher god bless you
This is awesome stuff. Thanks Brian!
Lets say I have a thumbnail and a list cell which render the same item array. Using generics, how would I register both cells? And also by clicking a button in the UI change the type of cell which should be displayed to toggle list view or thumbnail view. Hope that makes sense
Thanks for the awesome tutorial sir
Thanks for the great tutorial 🙏🏻
Great video! How to load cell from xib with generics ?
thanks, but already found solution
Hey brian, can you please make video for handling different types of UITableViewCell.
I can help y. But could y describe more about this? That mean how you want to handle, where? .. Just in tableview or else?
Really good explanations !!
Amazing work buddy!
Amazing video 👏
Hi brian! Thanks for your video I learn alot from you. Do you have some best API Client setup for latest using Alamofire? Thanks
Great video as usual! 🔥🔥🔥
Love you Brian!
great tutorials. 100% value 0 Fat
Awesome video. Thanks
Thank you so much for this awesome pearls!
Bless
Man after the dog cell i got lost, have to watch it again😀. But as always you are the best
Another great video 👍🏻❤️
Hi Brian,
Many thanks for this informative tutorial. I am, however, struggling with figuring out this method with sections I've set up my sectioning as below;
enum AccountSections {
case account
...etc
}
enum AccountRow {
case login
...etc
}
struct AccountSection {
var section: AccountSections
var accountRow: [AccountRow]
}
If you could, can you please point me in the right direction. Many thanks.
This technique of generics won’t work for multiple sections unless you configure a multidimensional array.
Even i want to be a android / ios developer like you, right now doing android development since six months gonna do some ios soon 🤘💪
Loved it!
thank you sir.. also hope to get your paid courses.
Generics are actually straightforward, not sure why it took me so long to get it
It takes a lot of good examples to really see what the point is
Question: How can I implement header into this. Not all tableview would have header but when I want do have header how do I modify this generic base table view class?
Can i use the power of generics in Objective-c app?
Thinking after attending web dev bootcamp last year , I want to learn iOS app dev. Is it harder to learn?
Question: How can we use didSelectRow(at:) method to push specific viewController?
Hi Brian, i'm having the same question, how to handle didSelectRow?
use closure
you can create function in base class something like handleCellSelection(), call it in didSelectRow and override handleCellSelection() in subclass
yes did the same. thanks btw
you can override didSelectRow function
Hi Brian, thanks for such wonderful video. I have a doubt that is in place of having the fixed data source. I wanna use fetch results controller to display my core data object.... How can we use generic cell example in that case... Thanks in advance
You'd simply append onto the items array after your core data fetch, and reloadData on tableview.
Thanks for the reply Brian.. my intention of using the fetch result controller was to use the delegates of fetch results controller, that would avoid complete reload of table view after initial data source has been loaded.
Oh yeah if you're using FetchedResultsController you'll probably have to do something different.
Thank you for interesting topics, but I am little confused. I heard a lot that you should not update view from itself and view must not know about any model. But you set data in view on itself. Is this correct way? It's not critics, I am just really interested in learning.
Yes, there are many different architectures you can choose from. This video is simply showing you the plumbing that can be put in place using Generics. You can modify the logic here to fit whatever model you're looking for.
thank you
Dope video!
Hi Brian, awesome video as always. Really like your teaching style. BTW, is it possible to use generics to handle problems like one collection view using multiple types of cell. For example, a collection view has dogCells, CatCells or birdCells. Currently, I use an array to store all cellIdentifier and writing a bunch of downcasting or class checking code, which is pretty annoying. Or maybe there is any better solution? Thank you so much.
I was a little curious about the multiple cell scenario, I think its best to simply use a custom initializer that takes in an array of cell classes:
class MultipleCellTableVC: UITableViewController {
let cellClasses: [BaseCell.Type]
var items = [Any]()
init(cellClasses: [BaseCell.Type]) {
self.cellClasses = cellClasses
super.init(nibName: nil, bundle: nil)
cellClasses.forEach { (c) in
let className = NSStringFromClass(c)
tableView.register(c, forCellReuseIdentifier: className)
}
}
//Override this in your subclass
func cellClassName(for indexPath: IndexPath) -> String {
let cellClass = cellClasses[indexPath.section]
return NSStringFromClass(cellClass)
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return items.count
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let identifier = cellClassName(for: indexPath)
let cell = tableView.dequeueReusableCell(withIdentifier: identifier, for: indexPath) as! BaseCell
cell.item = items[indexPath.row]
return cell
}
required init?(coder aDecoder: NSCoder) {
fatalError()
}
}
yap have a same question
Awesome, I'll try this. Thanks Brian!
Great stuff Brian!. Would you be able to do a short video walking through this code? I am still getting my head around generics and seeing it in action would really help. Thank you
For multiple cell types in 1 collection view you can also try IGListKit. It's pretty nice! Only draw back is you'd have to use class instead of struct for your model.
thanks for video.
awesome ! Thanks a lot =)
I finally grasped this video after watching it a 4th time
What if I m working on UiViewController not TableViewController ?
If you wanted to register multiple cells for a BaseTableVC generically would it make sense to make create BaseCells as an Array or a dictionary with [cellId:BaseCell]
For multiple cell types, I believe you could use a Generic Cell Class Array for BaseTableVC. For the identifiers, you could use a simple trick of registering cells with the actual class name. Its even MORE advanced, but maybe I'll go over this trick one day.
Lets Build That App what’s the reason for using a seperate cellId for a cell instead of just using the class name as a string? It seems like the latter is more simple
Yes, thats what I meant, simply use the cell class name as the id.
Great !
I’m assuming this approach wouldn’t work if you have different UI Elements in each cell? For example you have two uiviewcontrollers, the first shows uitableviewcells that have a uiimage and uilabel, and the other cell has 2 uiimages. How would you configure each one using generics?
Would they have to have the same elements?
Yes, this works only for a single cell table view. You can expand the code on your own to support multiple cells.
So it is possible to put a viewcontroller in the appdelegate class?
I don't exactly know what the question means.
MemoryLayout and pointers is the most advanced swift code i've seen
Hi brian ! Good day
是否有该视频demo的源码呢?
Brian you is lit.
thanks from china
Can you do it with collectionview. I tried but it's not succeed
I did with both collectionView and tableview. To create Generic collection view you have to implement a little more code but it gives us more flexibility
:
~~~~~~~~~~~~~~~~~
- setup in didFinishLaunchingWithOptions method the fallowing code :
~~~~~~~~~~~~~~~~~
let layout = UICollectionViewFlowLayout()
layout.scrollDirection = .vertical
window.rootViewController = SomeController(collectionViewLayout: layout)
~~~~~~~~~~~~~~~~~
- create custom textLabel (or whatever you want) and do not forget to add it as cell subview and align it inside the cell:
~~~~~~~~~~~~~~~~~~~~~~~~
class CatCell: BasicCollectionCell {
let myLabelText: UILabel = { // created custom label
let label = UILabel()
return label
}()
override func layoutSubviews() {
super.layoutSubviews()
backgroundColor = .red
addSubview(myLabelText) // added to superview
myLabelText.fillSuperView() // set constraints to its superview
}
override var cellItem: Cat! {
didSet {
myLabelText.text = cellItem.name
}
}
}
~~~~~~~~~~~~~~~~~
- conform your BaseCollecitonView clase to UICollectionViewDelegateFlowLayout protocol, and setup the sizeForItemAt method whatever you want:
~~~~~~~~~~~~~~~~
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
return CGSize(width: collectionView.frame.width, height: 50)
}
The rest of the code is the same as our BRILIANT TEACHER did in this video tutorial, obviously you have to implement numberOfItemsInSection & cellForItemAt exactly in the same way as Brian teach us.
PS: By the way, great stuff Brian !!!
thanks
Hi Brian, Can you please help, I am trying to create a Generic ViewController with some static functions so I don't need to retype them in all my ViewControllers. It compiles but it crashes every time
class GenericViewController : UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
static func storyboardInstance() -> T? {
let s = String.init(describing: self)
let storyboard = UIStoryboard(name: s, bundle: nil)
return storyboard.instantiateInitialViewController() as? T
}
}
class welcomeScreen : GenericViewController {
}
Thank$
hi, 不知道您会不会中文,我有一个问题, 我正在按着您说的学习不用storyboard,然后发现我如何能cast到一个class的实体呢?因为没有storyboard?.instantiateViewController(withIdentifier)这个命令了。
详细一点的是:
我在做一个“收藏”的功能,就是swip一个cell出来一个收藏的按键,然后点击这个按键后,那额这个cell的内容就被收藏了,
我有一个收藏的tableview,里面有一个shoucanglist,其实就是找到这个lsit然后添加就好了
我死活不知道如何找到这个list,我刚学swift不到一个月,大部分看的是您的视频
我点击收藏后不是立刻到收藏页面,而是这个收藏页面在一个tab里面,当我之后点击收藏view时应该显示我收藏的cell
不知道我写的清晰不清晰,非常抱歉如果您看不懂。
感谢您做的一切!
嗯 我还是建议你上我这一堂课吧
www.letsbuildthatapp.com/course/Intermediate-Training-Core-Data
里面有讲swipe和保存的东西
应该会带来很大的帮助
这个太棒了,我也解决了问题了!正在做人生第一个app到时候给您看!谢谢。
Hey Brian, really good video as usual. But I don't think that putting the model directly in your UITableViewCell/UICollectionViewCell subclass is a good idea. Sure it's a convenient and fast way for configuring the cell but you should extract that to another object because the view should't be aware of the model.
Here is an excellent resource: www.swiftbysundell.com/posts/preventing-views-from-being-model-aware-in-swift
Cheers
Yep there are a ton of more advanced architecture patterns that you can apply here. From the code we've seen in this video, you can modify the dequeue process to do whatever you please with the generic cell class. Feel free to expand on the logic here. Remember I'm only showing the way, the destination is yours.
Yeah sure, maybe you should start some videos about intermediate-advanced development techniques.
If you ask me to name some subtitle for your youtube channel, I will name it as "SPREADING KNOWLEDGE".
Knawledge
早
早!你应该住美国吧
我在加拿大。最近有没有新的付费课程上线?准备放弃Storyboard了,就靠你了。xD
聰明的選擇
Are you for hire for IOS App dev? Looking for a complex new social media app. Combines many of the aspects that many of the most popular apps have today all into one.