How would you implement and configure a UITableView or RecyclerView to display custom cells with varying heights?