private func scrollToBottom() { let lastSectionIndex = (collectionView?.numberOfSections())! - 1 let lastItemIndex = (collectionView?.numberOfItemsInSection(lastSectionIndex))! - 1 let indexPath = NSIndexPath(forItem: lastItemIndex, inSection: lastSectionIndex) collectionView!.scrollToItemAtIndexPath(indexPath, atScrollPosition: UICollectionViewScrollPosition.Bottom, animated: false) }