在AFOpenFlow库中有两行代码,表示coverFlow位于iPhone屏幕的中间:
CGPoint newPosition;
newPosition.x = halfScreenWidth + aCover.horizontalPosition;
newPosition.y = halfScreenHeight + aCover.verticalPosition;但是我怎么能改变这一行,那就是coverFlow在屏幕的高范围?
马可
发布于 2010-09-27 15:07:45
我不知道AFOpenFlow,但这里的数学公式是将视图的中间位置设置为屏幕中心。如果您希望视图仅占屏幕大小的一半,则还需要更改其高度。它将如下所示:
已更新代码
CGSize newSize = CGSizeMake(screenWidth, swcreenHeight/2);
CGPoint newCenterPosition = CGPointMake(halfScreenWidth+aCover.horizontalPosition, halfScreenHeight/2+aCover.verticalPosition)
aCover.bounds = CGRectMake(newCenterPosition.x, newCenterPosition.y, newSize.width, newSize.height);https://stackoverflow.com/questions/3801591
复制相似问题