English 中文(简体)
如何了解UIScroll 意见中正在看什么形象? 此外,是否有可能为无休止的效果而进行循环开发?
原标题:How to know which image is being viewed in UIScrollView? Also, is it possible to loop scrolling for an endless effect?

这是我试图做的事,我不敢肯定,如果能够使用UIScroll 的话。 首先,我不关心动物循环,我所关心的是,用户能够通过像我所看的“照片评估”等图像进行播音。 但是,我如何知道他在使用UIScroll意见时看到什么形象? 例如,如果他从10个图像中删除第3个图像,我知道他如何掌握这一形象? 我找不到获得指数的途径(是否可以查阅)?

此外,一旦用户向最后形象倾斜,我就不希望滚动停止,但我希望它照亮,使图1出现在图像10之后。 反之亦然,如果您的雕刻留下了图像1,就会看到图像10。 我不要求逻辑,我可以简单地在一阵列中这样做,我只不知道如何(如果甚至可能的话)获得滚动观点中图像索引。

如果没有,谁能找到解决办法?

页: 1

最佳回答

希望这将有助于你们。

/浏览是你装上图像的观点。

CGFloat pageWidth = scrollView.frame.size.width;
int page = floor((scrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1;

Thanks,
jim.

问题回答

暂无回答




相关问题
adding an index to sql server

I have a query that gets run often. its a dynmaic sql query because the sort by changes. SELECT userID, ROW_NUMBER(OVER created) as rownumber from users where divisionID = @divisionID and ...

Linq to SQL nvarchar problem

I have discovered a huge performance problem in Linq to SQL. When selecting from a table using strings, the parameters passed to sql server are always nvarchar, even when the sql table is a varchar. ...

TableView oval button for Index/counts

Can someone help me create an index/count button for a UITableView, like this one? iTunes http://img.skitch.com/20091107-nwyci84114dxg76wshqwgtauwn.preview.jpg Is there an Apple example, or other ...

Move or copy an entity to another kind

Is there a way to move an entity to another kind in appengine. Say you have a kind defines, and you want to keep a record of deleted entities of that kind. But you want to separate the storage of ...

热门标签