I specifically want to use UITableView.Plain
. How can I disable floating headers without switching to UITableView.Grouped
?
Asked
Active
Viewed 9,410 times
-1

aroooo
- 4,726
- 8
- 47
- 81
-
You can use `.plain` by doing a simple trick, which is adding the header as a custom cell (not a header view), `cellForRowAtIndexPath` should has the logic to check when it should returns a header cell. – Ahmad F Nov 27 '16 at 11:21
-
[Don't post same questions twice](http://stackoverflow.com/questions/40828183/uitableview-grouped-disable-section-header) – Fahim Parkar Nov 27 '16 at 11:45
1 Answers
0
Best solution will be to fake the header behavior using custom cells, there are few private methods which can be overridden. But the latter solution is not recommended as it may cause application to be rejected by appstore.
Please look in to the below question for better understanding
Is it possible to disable floating headers in UITableView with UITableViewStylePlain?