¡@

Home 

2014/10/15 ¤U¤È 10:13:41

iphone Programming Glossary: sectionheaderheight

Change Default Scrolling Behavior of UITableView Section Header

http://stackoverflow.com/questions/664781/change-default-scrolling-behavior-of-uitableview-section-header

extends UIScrollViewDelegate like this void scrollViewDidScroll UIScrollView scrollView CGFloat sectionHeaderHeight 40 if scrollView.contentOffset.y sectionHeaderHeight scrollView.contentOffset.y 0 scrollView.contentInset UIEdgeInsetsMake.. this void scrollViewDidScroll UIScrollView scrollView CGFloat sectionHeaderHeight 40 if scrollView.contentOffset.y sectionHeaderHeight scrollView.contentOffset.y 0 scrollView.contentInset UIEdgeInsetsMake scrollView.contentOffset.y 0 0 0 else if scrollView.contentOffset.y.. 0 scrollView.contentInset UIEdgeInsetsMake scrollView.contentOffset.y 0 0 0 else if scrollView.contentOffset.y sectionHeaderHeight scrollView.contentInset UIEdgeInsetsMake sectionHeaderHeight 0 0 0 Only problem here is that it looses a little bit of..

Grouped uitableview with shadow

http://stackoverflow.com/questions/6912904/grouped-uitableview-with-shadow

helper method CGRect shadowFrameForSection NSInteger section CGRect sectionFrame self rectForSection section CGFloat sectionHeaderHeight CGRectGetHeight self rectForHeaderInSection section CGFloat sectionFooterHeight CGRectGetHeight self rectForFooterInSection.. sectionFooterHeight CGRectGetHeight self rectForFooterInSection section UIEdgeInsets contentInsets UIEdgeInsetsMake sectionHeaderHeight 1 10 sectionFooterHeight 1 10 return UIEdgeInsetsInsetRect sectionFrame contentInsets the code is self explanatory i think..