Quantcast
Channel: Change Default Scrolling Behavior of UITableView Section Header - Stack Overflow
Browsing all 20 articles
Browse latest View live
↧

Image may be NSFW.
Clik here to view.

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 Article


Answer 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 Article

Answer 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 Article

Answer 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 Article

Answer 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 Article


Answer 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 Article

Answer 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 Article

Answer 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 Article


Answer 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 Article


Answer 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 Article

Answer 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 Article

Answer 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 Article

Answer 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 Article


Answer 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 Article

Answer 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 Article


Answer 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 Article

Answer 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 Article


Answer 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 Article

Answer 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 Article

Change 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
Browsing all 20 articles
Browse latest View live