iOS 计算获取Scrollview (tableView、collectionView) 滚动百分比
CGFloat x = scrollview.contentOffset.x;
CGFloat y = scrollview.contentOffset.y;
CGFloat width = scrollview.contentSize.width;
CGFloat height = scrollview.contentSize.height;
CGFloat superVWidth = scrollview.superview.frame.size.width;
CGFloat superVHeight = scrollview.superview.frame.size.height;
//已滚动所占百分比 - 竖直滚动方向
int yInt = (y+superVHeight)/height ; // + superVHeight为已显示的内容高度,否则为滑动的高度
//已滚动所占百分比 - 水平滚动方向
int xInt = (x+superVWidth)/width; //同理