Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pod file & UI adjusted for all sizes. #11

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions DoImagePicker.podspec
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions ImagePicker/DoImagePicker/DoImagePickerController.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
10 changes: 2 additions & 8 deletions ImagePicker/DoImagePicker/DoImagePickerController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down