Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Adding header support for TUITableView sections #11

Merged
merged 5 commits into from
Jul 25, 2011

Conversation

bww
Copy link
Contributor

@bww bww commented Jul 7, 2011

UITableView will display a header view for sections when its data source returns a view for the new delegate method tableView:headerViewForSection:. The header view is a plain old TUIView and is not reusable (stored in section info). The height of the header view is not adjusted by the table view and its height determines the height of the section header.

I've also changed the way did select delegate methods are triggered (they're taken out of the cell, since they really belong to the table) so that changing the selection either by clicking or via the arrow keys (or some other programmatic method) now notifies the delegate. Previously, changing the selection by arrow keys did not actually notify the delegate the selection had changed.

I've also added .animateSelectionChanges to TUITableView which can be set FALSE to cause the table not to animation selection changes. There's probably a more elegant way to do this...

The example project has been updated to reflect these changes.

Brian William Wolter added 5 commits July 7, 2011 16:47
…elegate) instead of just changing the highlighted state of the selected/deselected cell via:

- (void)selectRowAtIndexPath:(TUIFastIndexPath *)indexPath animated:(BOOL)animated scrollPosition:(TUITableViewScrollPosition)scrollPosition;
- (void)deselectRowAtIndexPath:(TUIFastIndexPath *)indexPath animated:(BOOL)animated;

This also causes selection changes via arrow keys to notify the delegate of the selection change.
- Adding sections to the example project
- Adding bounds checking in table section header index enumeration
@lorenbrichter
Copy link
Contributor

awesome! I'm going to bang on this for a bit, then merge.

@brutella
Copy link
Contributor

Cool, fixes my issue #19 and makes my commit redundant #20

@lorenbrichter lorenbrichter merged commit fff317f into twitter-archive:master Jul 25, 2011
@lorenbrichter
Copy link
Contributor

merged! (with some formatting tweaks & I force the header view to autoresize width-wise)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants