|
[BUG]
IOS下面UIScrollPicture.setCurrentIndex显示图片未更新
[复制链接]
IOS下面UIScrollPicture.setCurrentIndex显示图片未更新,如下面代码mScroll.setCurrentIndex({index: mIndex});未起作用:
- mScroll = api.require('UIScrollPicture');
- mScroll.open({
- rect: {
- x: 0,
- y: $('#header').height(),
- w: api.winWidth,
- h: api.winHeight - $('#header').height()
- },
- data: {
- paths: mPhotos
- },
- contentMode: 'scaleAspectFit',
- placeholderImg: 'widget://image/image_back.png',
- auto: false,
- loop: false
- },
- function (ret, err) {
- if ('show' == ret.eventType) {
- mScroll.setCurrentIndex({index: mIndex});
- //滑动图片时的回调
- mScroll.addEventListener({
- name: 'scroll'
- }, function (cret, cerr) {
- mIndex = cret.index;
- $('#title').text((mIndex + 1) + ' / ' + mPhotos.length);
- });
- }
- }
- );
复制代码
|
|