I'm wondering if we can make a dynamic function to access the cell template (xib template) for dynamic like this:
func create_image(TemplateName:??? = TemplateCell) {
var cell = self.tableView.cellForRow(at: currindexpath as IndexPath) as! TemplateName
}
I want to pass the "TemplateName" with the name of class of UITableViewCell:
class template1: UITableViewCell {
}
so on that parameter I can pass any template cell that I made. Is that possible? Sorry if hard to explain.