Minimize ios toolbar

I have a new design for my application, and it includes parallax scrolling to display the image on top of the tableView.

I know how to add a parallax effect with placing an image in a cell, for example:

when calling the scrollViewDidScroll table:

- (void)scrollViewDidScroll:(UIScrollView *)scrollView {

    CGPoint currentOffset = scrollView.contentOffset;

        if (currentOffset.y > _lastContentOffset.y) {
            //Scroll Up

            _containerView.clipsToBounds = true;
            _bottomSpaceConstraint.constant = -scrollView.contentOffset.y / 2;
            _topSpaceConstraint.constant = scrollView.contentOffset.y / 2;

        } else {
           //Scroll Down

            _topSpaceConstraint.constant = scrollView.contentOffset.y;
            _containerView.clipsToBounds = false;

        } 

        _lastContentOffset = currentOffset;

}

(_bottomSpaceConstraint and _topSpaceConstraint are the upper and lower image limits that are inside the tableView cell in section 0)

, , . ( ) , . , TableView, , . , , . , , .

android " ". http://antonioleiva.com/collapsing-toolbar-layout/

- , " " iOS.

!

+4
1

UIView, , tableHeaderView tableView. scrollViewDidScroll: .

0

Source: https://habr.com/ru/post/1607258/


All Articles