mirror of
https://github.com/zhigang1992/ZGParallelView.git
synced 2026-06-17 02:15:38 +08:00
b5dc03ebb8e3bb2f1be583b3d50ac802d0cee52d
ZGParallelView
####ParallelView For UITableView
ParallelView is the easiest way to add a Parallax effect to a UITableView. It works perfectly with UITableViewController and is completedly compatable with either UITableViewStyle
####Install
-
Drag and Copy the
UITableView+ZGParallelView.handUITableView+ZGParallelView.minto your project. -
Import those two files into your VC.
-
In
ViewDidLoad. Initialate the parallelView:- (void)addParallelViewWithUIView:(UIView *)aViewToAdd;
//or
- (void)addParallelViewWithUIView:(UIView *)aViewToAdd withDisplayRadio:(CGFloat )displayRadio; //By default, displayRadio is 0.5
- (void)addParallelViewWithUIView:(UIView *)aViewToAdd;
//or
-
In your
UITableViewDelegate, implement thi methodscrollViewDidScroll:(UIScrollView *)like this: - (void)scrollViewDidScroll:(UIScrollView *)scrollView{ [self.tableView updateParallelView]; }
####Screenshot
Languages
Objective-C
95.9%
Ruby
4.1%

