Hello @mac-cain13 Ma
Version: 5.0.0.alpha.2
I got a lot of warning on my project like this
'MyCell' is deprecated: Use UINib(resource: R.nib.myCell) instead
Thank you so much.
You're welcome!
@mac-cain13: Can you update your code in the library to fixing this warning?
I think you should update your code according to the warning. Could you post the code you have in your project that gives this warning? You probably need to replace it with the suggested new initializer.
This is my code which always show warnning " 'myCell' is deprecated: Use UINib(resource: R.nib.myCell) instead":
tbv.register(R.nib.myCell(), forCellReuseIdentifier: cellID)
Tks.
I try to use this but some cases not work:
Tks.
@mac-cain13
+1
The correct way to register a cell for reuse, as the documentation states, is: tableView.register(R.nib.myCell)
If you get the error Cannot invoke 'register' with an argument list of type '(_R.nib.myCell)', that means you haven't configured a reuseIdentifier in you nib.
I agree that this isn't a very useful error message from the Swift compiler. However, I'm not sure if we can do something about that.
See the documentation: https://github.com/mac-cain13/R.swift/blob/master/Documentation/Examples.md#reusable-table-view-cells
Most helpful comment
The correct way to register a cell for reuse, as the documentation states, is:
tableView.register(R.nib.myCell)If you get the error
Cannot invoke 'register' with an argument list of type '(_R.nib.myCell)', that means you haven't configured a reuseIdentifier in you nib.I agree that this isn't a very useful error message from the Swift compiler. However, I'm not sure if we can do something about that.
See the documentation: https://github.com/mac-cain13/R.swift/blob/master/Documentation/Examples.md#reusable-table-view-cells