casillas
casillas

Reputation: 16813

Add an item at the end of tableview as a scrollable item

I am trying to implement a page as follows.

There is either a custom table view or collection view used to list repetitive items (such as number of orders, name of the order and price, etc..), but subtotal and taxes should also be part of the scrollable items. I wonder how making these items scrollable can be implemented. Promo code and add tip should not be scrollable items.

screenshot

Upvotes: 0

Views: 35

Answers (1)

Jitendra Solanki
Jitendra Solanki

Reputation: 772

If you want to add an item to the end of the tableView, you can create a custom view as per your need and add it as the footer view of the tableView. For example:

 let footerView  = UIView(frame: CGRect(x: 0, y: 0, width: self.view.frame.size.width, height:YOUR_VIEW_HEIGHT))

You can create as complex of a view hierarchy as you want. Now add this footerView:

 yourTableView.tableFooterView = footerView

Upvotes: 2

Related Questions