floor 函数 功能:返回小于或者等于指定表达式的最大整数

如下,当偏移量达到50%时,就翻页

page = floor((scrollView0.contentOffset.x - pageWidth / 2) / pageWidth) + 1;

 

posted @ 2013-05-26 02:53  ygm900  阅读(251)  评论(0编辑  收藏  举报