Answer by Arjun Shukla for Change Default Scrolling Behavior of UITableView...
Select Grouped Table View style from your tableView's Attribute Inspector in storyboard.
View ArticleAnswer by Jeff for Change Default Scrolling Behavior of UITableView Section...
Swift version of @awulf answer, which works great!func scrollViewDidScroll(scrollView: UIScrollView) { let sectionHeight: CGFloat = 80 if scrollView.contentOffset.y <= sectionHeight {...
View ArticleAnswer by Ash for Change Default Scrolling Behavior of UITableView Section...
Change your TableView Style:self.tableview = [[UITableView alloc] initwithFrame:frame style:UITableViewStyleGrouped];As per apple documentation for UITableView:UITableViewStylePlain- A plain table...
View ArticleAnswer by Arthur S for Change Default Scrolling Behavior of UITableView...
Just change TableView Style:self.tableview = [[UITableView alloc] initwithFrame:frame style:UITableViewStyleGrouped];UITableViewStyle Documentation:UITableViewStylePlain- A plain table view. Any...
View ArticleAnswer by Greg Combs for Change Default Scrolling Behavior of UITableView...
Now that the grouped style looks basically the same as the plain style in iOS 7 (in terms of flatness and background), for us the best and easiest (i.e. least hacky) fix was to simply change the table...
View ArticleAnswer by marmor for Change Default Scrolling Behavior of UITableView Section...
@LocoMike's answer best fitted my tableView, however it broke when using footers as well.So, this is the corrected solution when using headers and footers:-...
View ArticleAnswer by Thomas Kekeisen for Change Default Scrolling Behavior of...
I was not happy with the solutions described here so far, so I tried to combine them. The result is the following code, inspired by @awulf and @cescofry. It works for me because I have no real table...
View ArticleAnswer by Doc for Change Default Scrolling Behavior of UITableView Section...
Originally posted Here, a quick solution using the IB. The same can be done programmatically though quite simply.A probably easier way to achieve this (using IB):Drag a UIView onto your TableView to...
View ArticleAnswer by anemo for Change Default Scrolling Behavior of UITableView Section...
Check my answer here. This is the easiest way to implement the non-floating section headerswithout any hacks.
View ArticleAnswer by AlexBB for Change Default Scrolling Behavior of UITableView Section...
I found an alternative solution, use the first cell of each section instead a real header section, this solution don't appears so clean, but works so fine, you can use a defined prototype cell for your...
View ArticleAnswer by Soni for Change Default Scrolling Behavior of UITableView Section...
I've learned that just setting the tableHeaderView property does it, i.e. : tableView.tableHeaderView = customView;and that's it.
View ArticleAnswer by LocoMike for Change Default Scrolling Behavior of UITableView...
I know it comes late, but I have found the definitive solution!What you want to do is if you have 10 sections, let the dataSource return 20. Use even numbers for section headers, and odd numbers for...
View ArticleAnswer by cescofry for Change Default Scrolling Behavior of UITableView...
Set the headerView of the table with a transparent view with the same height of the header in section view. Also initi the tableview with a y frame at -height.self.tableview = [[UITableView alloc]...
View ArticleAnswer by Neil Gall for Change Default Scrolling Behavior of UITableView...
There are several things that need done to solve this problem in a non-hacky manner:Set the table view style to UITableViewStyleGroupedSet the table view backgroundColor to [UIColor clearColor]Set the...
View ArticleAnswer by voidStern for Change Default Scrolling Behavior of UITableView...
You can also add a section with zero rows at the top and simply use the footer of the previous section as a header for the next.
View ArticleAnswer by awulf for Change Default Scrolling Behavior of UITableView Section...
The way I solved this problem is to adjust the contentOffset according to the contentInset in the UITableViewControllerDelegate (extends UIScrollViewDelegate) like this:-...
View ArticleAnswer by Mike A for Change Default Scrolling Behavior of UITableView Section...
Assign a negative inset to your tableView. If you have 22px high section headers, and you don't want them to be sticky, right after you reloadData add:self.tableView.contentInset =...
View ArticleAnswer by Dolbex for Change Default Scrolling Behavior of UITableView Section...
I add the table to a Scroll View and that seems to work well.
View ArticleAnswer by Colin Barrett for Change Default Scrolling Behavior of UITableView...
Were it me doing this, I'd take advantage of the fact that UITableViews in the Plain style have the sticky headers and ones in the Grouped style do not. I'd probably at least try using a custom table...
View ArticleChange Default Scrolling Behavior of UITableView Section Header
I have a UITableView with two sections. It is a simple table view. I am using viewForHeaderInSection to create custom views for these headers. So far, so good.The default scrolling behavior is that...
View Article