case Recent = 10000
case Default = 10001
case Emoji = 10002
case Lxh = 10003
}
=================================================
func didToolBarItemClick(type: EmoticonToolBarButtonType) {
switch type{
case .Recent:
let indexPath = NSIndexPath(forItem: 0, inSection: 0)
collectionView.scrollToItemAtIndexPath(indexPath, atScrollPosition: UICollectionViewScrollPosition.CenteredHorizontally, animated: false)
case .Default:
let indexPath = NSIndexPath(forItem: 0, inSection: 1)
collectionView.scrollToItemAtIndexPath(indexPath, atScrollPosition: UICollectionViewScrollPosition.CenteredHorizontally, animated: false)
case .Emoji:
let indexPath = NSIndexPath(forItem: 0, inSection: 2)
collectionView.scrollToItemAtIndexPath(indexPath, atScrollPosition: UICollectionViewScrollPosition.CenteredHorizontally, animated: false)
case .Lxh:
let indexPath = NSIndexPath(forItem: 0, inSection: 3)
collectionView.scrollToItemAtIndexPath(indexPath, atScrollPosition: UICollectionViewScrollPosition.CenteredHorizontally, animated: false)
default : break
}