AKPickerView icon indicating copy to clipboard operation
AKPickerView copied to clipboard

reloadData, selectedItem is not in range

Open dmitryyashkin-otg opened this issue 8 years ago • 0 comments

- (void)reloadData
{
	[self invalidateIntrinsicContentSize];
	[self.collectionView.collectionViewLayout invalidateLayout];
	[self.collectionView reloadData];
	if ([self.dataSource numberOfItemsInPickerView:self]) {
		[self selectItem:self.selectedItem animated:NO notifySelection:NO];
	}
}

if statement should be changed to if ([self.dataSource numberOfItemsInPickerView:self] > self.selectedItem ) {

dmitryyashkin-otg avatar May 05 '17 14:05 dmitryyashkin-otg