UITableview multi-custom cell [UITableview 使用多個自訂cell的處理]

July 23, 2017 0 Comments

It's easy to display tableview if just one cell templete, but when comes more then 2 or 3 different cells what to show on same UITableview, it will become very mass if we put all our logic code in side the fuction.

Just looks like:



So we put those codes in different methods and return to UITableViewCell , Then the code will look more clear.

Then we put the return cell into another function:

See! code looks much better!

Download source code here

0 comments: