Skip to content

Instantly share code, notes, and snippets.

@serhatsezer
Created August 11, 2017 14:02
Show Gist options
  • Save serhatsezer/f3b9e364882379f61d78a546fe80f101 to your computer and use it in GitHub Desktop.
Save serhatsezer/f3b9e364882379f61d78a546fe80f101 to your computer and use it in GitHub Desktop.
...
struct TextPresentableStruct: TextPresentable {
var text: String = "Sample text..."
}
// Other implementations...
...
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let productCell = tableView.dequeueReusableCell(withIdentifier: ProductCell.cellID, for: indexPath) as! ProductCell
let textStruct = TextPresentableStruct()
productCell.configure(presenter: textStruct )
return productCell
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment