0

I created a UITableView with ContentInset of 75.

In UITableView, I set a section view with height 30

Now when I scroll the UITableView, section is fixed at 75, not scrolls along with table cells, How can I make it scroll beyond the contentInset along with table cells

Is there any built-in property of UITableView to achieve this or any custom solution for this?

Rajan Balana
  • 3,775
  • 25
  • 42
anjnkmr
  • 838
  • 15
  • 37
  • 1
    self.tableView.style = UITableViewStyleGrouped. write this line in ViewDidLoad method. May this help you! – Yagnesh Dobariya Nov 10 '16 at 04:27
  • Thanks, it gives error `Cannot assign to property: 'style' is a get-only property` any idea about this – anjnkmr Nov 10 '16 at 05:35
  • 1
    @yagneshdobariya i set it in the initialization of tableview `tableview = UITableView(CGRectZero, style: .Grouped);`, then it works thank you – anjnkmr Nov 10 '16 at 05:53

1 Answers1

1

Change your tableview's style form plain to group .

enter image description here

KKRocks
  • 8,222
  • 1
  • 18
  • 84