Last active
December 20, 2015 14:29
-
-
Save uberbruns/6146542 to your computer and use it in GitHub Desktop.
Makes the first row of an UITableView ignoring the bounce effect, like the gallery for highlights in the AppStore App.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)scrollViewDidScroll:(UIScrollView *)scrollView { | |
if (scrollView.contentOffset.y < 0) { | |
UIView * firstCell = [_tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; | |
firstCell.frame = ({ | |
CGRect frame = firstCell.frame; | |
frame.origin.y = 0; | |
[_tableView.superview convertRect:frame toView:firstCell.superview]; | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment