error: collectionView滚到indexPath指定Cell 程序崩溃
NSInvalidArgumentException' : attempt to scroll to invalid index path
objective-c 实现
[self.collectionView scrollToItemAtIndexPath:indexPath atScrollPosition:Left
animated:NO];
swift 实现
collectionView.scrollToItemAtIndexPath(indexPath!, atScrollPosition: .Left,animated: false)
fix - BUG: 检查collectionView有无设置完毕(检查代码顺序)