diff --git a/package.json b/package.json index 1120861..0289cbd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-plugin-mediapicker-dmcbig", - "version": "2.3.4", + "version": "2.3.5", "description": "android ios mediaPicker support selection of multiple image and video", "cordova": { "id": "cordova-plugin-mediapicker-dmcbig", diff --git a/plugin.xml b/plugin.xml index c55e259..55146f3 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,6 +1,6 @@ - + MediaPicker diff --git a/src/ios/DMCMediaPicker/DmcPickerViewController.m b/src/ios/DMCMediaPicker/DmcPickerViewController.m index 31245b4..1e2947e 100644 --- a/src/ios/DMCMediaPicker/DmcPickerViewController.m +++ b/src/ios/DMCMediaPicker/DmcPickerViewController.m @@ -219,12 +219,14 @@ } -(void)show:(NSInteger *)index{ - fetchResult = dataSource[(int)index]; - [self setTitleView:albumsTitlelist[(int)index]]; - [_collectionView reloadData]; - [self hiddenAlbumlistView]; - [_collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0] atScrollPosition:UICollectionViewScrollPositionTop animated:NO]; - nowSelectAlbum=index; + if([dataSource count]>0){ + fetchResult = dataSource[(int)index]; + [self setTitleView:albumsTitlelist[(int)index]]; + [_collectionView reloadData]; + [self hiddenAlbumlistView]; + [_collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0] atScrollPosition:UICollectionViewScrollPositionTop animated:NO]; + nowSelectAlbum=index; + } }