Currently, I've a UITableViewCell
subclass that has the same view as UITableViewHeaderFooterView
subclass. I setup the subclass views programmatically that includes a bunch of UILabels and UIImageviews. Currently, I've just copy/pasted the code between the two files. I was wondering if there is a way to consolidate code. I can't inherit code as UITableViewCell and UITableViewHeaderFooterView
are different. I'm guessing the right answer is through the use of protocols but I'm having a hard time figuring out how to actually implement it. Any thoughts or ideas?
Asked
Active
Viewed 63 times
1
-
3How about create a view and add it as a subview for both UITableViewCell and UItableViewHeaderFooterView? – Mahbub Morshed Jan 02 '18 at 05:27
-
1Add code to the question, it helps to answer better. – Raviprakash Jan 02 '18 at 05:40