FDSlideBar icon indicating copy to clipboard operation
FDSlideBar copied to clipboard

FDSliderBar类里面scrollToVisibleItem:方法

Open nellace opened this issue 9 years ago • 3 comments

if (selectedItemIndex < visibleItemIndex) { // The item to be visible is on the right of the selected item and the selected item is out of screeen by the left, also the opposite case, set the offset respectively if (CGRectGetMaxX(_selectedItem.frame) < offset.x) { offset.x = CGRectGetMinX(item.frame); } else { offset.x = CGRectGetMaxX(item.frame) - CGRectGetWidth(_scrollView.frame); } }

在selectedItemIndex < visibleItemIndex的条件下并不会出现CGRectGetMaxX(_selectedItem.frame) < offset.x的情况啊,直接 if (selectedItemIndex < visibleItemIndex) { // The item to be visible is on the right of the selected item and the selected item is out of screeen by the left, also the opposite case, set the offset respectively offset.x = CGRectGetMaxX(item.frame) - CGRectGetWidth(_scrollView.frame);

}else{
   ........

}就可以啊

nellace avatar Aug 13 '15 08:08 nellace

会出现的。选中上面的某一个item,然后把它滑出scrollView的左边不能显示时,现在你滑动下面的content内容,便会出现这个case。

fergusding avatar Aug 14 '15 01:08 fergusding

如果嵌套一个tableView在其中,怎么实现其中数据的同步,还有怎么实现选中指定的标题?

2854543111 avatar Jul 11 '16 15:07 2854543111

6c4de59d-4140-4f1e-93a3-5abc080c7a8e 点击一个item进入其他viewCOntroller,再退出来,item就发生偏移了,难道就我一个人遇到这样的问题吗?

hongzhewudi avatar Feb 18 '17 11:02 hongzhewudi