Limit the scroll for UITableView

后端 未结 5 870
不知归路
不知归路 2021-01-13 14:27

I have a TableViewController:

\"enter

As you see I have my own custom bar at t

5条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-13 15:02

    You need to create your view controller object as type UIViewController and not UITableViewController. Then add the custom bar as a subview to self.view. Create a separate UITableView and add it below the custom bar. That should make custom bar static and table view scrollable.

    Update:

    In order to make the tableview static you need to set it as

    tableView.scrollEnabled = NO:
    

    Let me know if this works for you.

提交回复
热议问题