diff --git a/DoImagePicker.podspec b/DoImagePicker.podspec new file mode 100644 index 0000000..64af4a7 --- /dev/null +++ b/DoImagePicker.podspec @@ -0,0 +1,7 @@ +Pod::Spec.new do |s| + s.name = 'DoImagePicker' + s.version = '0.0.1' + s.source_files = 'ImagePicker/DoImagePicker/*.{h,m}' + s.resources = 'ImagePicker/DoImagePicker/*.xib' + s.requires_arc = true +end diff --git a/ImagePicker/DoImagePicker/DoImagePickerController.h b/ImagePicker/DoImagePicker/DoImagePickerController.h index ded8a56..9978b8a 100644 --- a/ImagePicker/DoImagePicker/DoImagePickerController.h +++ b/ImagePicker/DoImagePicker/DoImagePickerController.h @@ -10,10 +10,10 @@ #define DO_RGB(r, g, b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1] #define DO_RGBA(r, g, b, a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a] -#define DO_MENU_BACK_COLOR DO_RGBA(57, 185, 238, 0.98) -#define DO_SIDE_BUTTON_COLOR DO_RGBA(57, 185, 238, 0.9) +#define DO_MENU_BACK_COLOR ([UINavigationBar appearance].barTintColor)//DO_RGBA(254, 64, 128, 0.88) +#define DO_SIDE_BUTTON_COLOR ([UINavigationBar appearance].barTintColor)//DO_RGBA(254, 64, 128, 0.8) -#define DO_ALBUM_NAME_TEXT_COLOR DO_RGB(57, 185, 238) +#define DO_ALBUM_NAME_TEXT_COLOR ([UINavigationBar appearance].barTintColor) //DO_RGB(254, 64, 128) #define DO_ALBUM_COUNT_TEXT_COLOR DO_RGB(247, 200, 142) #define DO_BOTTOM_TEXT_COLOR DO_RGB(255, 255, 255) diff --git a/ImagePicker/DoImagePicker/DoImagePickerController.m b/ImagePicker/DoImagePicker/DoImagePickerController.m index 3b7bcde..2291f2a 100644 --- a/ImagePicker/DoImagePicker/DoImagePickerController.m +++ b/ImagePicker/DoImagePicker/DoImagePickerController.m @@ -339,14 +339,8 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPa - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { - if (_nColumnCount == 2) - return CGSizeMake(158, 158); - else if (_nColumnCount == 3) - return CGSizeMake(104, 104); - else if (_nColumnCount == 4) - return CGSizeMake(77, 77); - - return CGSizeZero; + CGFloat width = ([UIScreen mainScreen].bounds.size.width-3*_nColumnCount)/_nColumnCount; + return CGSizeMake(width, width); } - (void)scrollViewDidScroll:(UIScrollView *)scrollView