diff --git a/DoImagePickerController.podspec b/DoImagePickerController.podspec new file mode 100644 index 0000000..555fffd --- /dev/null +++ b/DoImagePickerController.podspec @@ -0,0 +1,13 @@ +Pod::Spec.new do |s| + s.name = 'DoImagePickerController' + s.version = '0.0.1' + s.summary = 'An image picker controller with single selection and multiple selection. Support to select lots photos with panning gesture.' + s.homepage = 'https://github.com/donobono/DoImagePickerController' + s.license = 'MIT' + s.author = { 'donobono' => 'email@address.com' } + s.source = { :git => 'https://github.com/ljlin/DoImagePickerController.git', :tag => '0.0.1' } + s.source_files = 'DoImagePicker', 'ImagePicker/DoImagePicker/*.{h,m}' + s.resources = 'Resources/Images/*.{png,xib}' + s.requires_arc = true + +end diff --git a/ImagePicker.xcodeproj/project.pbxproj b/ImagePicker.xcodeproj/project.pbxproj index 929e42b..0752005 100644 --- a/ImagePicker.xcodeproj/project.pbxproj +++ b/ImagePicker.xcodeproj/project.pbxproj @@ -25,12 +25,9 @@ 73238D141890AAC70047DDA0 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 73238D121890AAC70047DDA0 /* InfoPlist.strings */; }; 73238D161890AAC70047DDA0 /* ImagePickerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 73238D151890AAC70047DDA0 /* ImagePickerTests.m */; }; 73238D231890AD4B0047DDA0 /* DoImagePickerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 73238D211890AD4B0047DDA0 /* DoImagePickerController.m */; }; - 73238D241890AD4B0047DDA0 /* DoImagePickerController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 73238D221890AD4B0047DDA0 /* DoImagePickerController.xib */; }; 73238D2A1890AF010047DDA0 /* DoAlbumCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 73238D291890AF010047DDA0 /* DoAlbumCell.m */; }; - 73238D311890AF380047DDA0 /* DoAlbumCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 73238D301890AF380047DDA0 /* DoAlbumCell.xib */; }; 73238D341890C97F0047DDA0 /* AssetHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 73238D331890C97F0047DDA0 /* AssetHelper.m */; }; 73238D4D1890DC320047DDA0 /* DoPhotoCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 73238D4C1890DC320047DDA0 /* DoPhotoCell.m */; }; - 73238D4F1890DC4C0047DDA0 /* DoPhotoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 73238D4E1890DC4C0047DDA0 /* DoPhotoCell.xib */; }; 73C76E3518A109A8001C60EB /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 73C76E3418A109A8001C60EB /* README.md */; }; 73E1110C18914C260011CBD3 /* check@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 73E1110818914C260011CBD3 /* check@2x.png */; }; 73E1110D18914C260011CBD3 /* close@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 73E1110918914C260011CBD3 /* close@2x.png */; }; @@ -40,6 +37,9 @@ 73E1111518915AEA0011CBD3 /* close.png in Resources */ = {isa = PBXBuildFile; fileRef = 73E1111118915AEA0011CBD3 /* close.png */; }; 73E1111618915AEA0011CBD3 /* down.png in Resources */ = {isa = PBXBuildFile; fileRef = 73E1111218915AEA0011CBD3 /* down.png */; }; 73E1111718915AEA0011CBD3 /* up.png in Resources */ = {isa = PBXBuildFile; fileRef = 73E1111318915AEA0011CBD3 /* up.png */; }; + BF577C9A192BA47800E874E6 /* DoAlbumCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BF577C97192BA47800E874E6 /* DoAlbumCell.xib */; }; + BF577C9B192BA47800E874E6 /* DoImagePickerController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BF577C98192BA47800E874E6 /* DoImagePickerController.xib */; }; + BF577C9C192BA47800E874E6 /* DoPhotoCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BF577C99192BA47800E874E6 /* DoPhotoCell.xib */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -77,15 +77,12 @@ 73238D151890AAC70047DDA0 /* ImagePickerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ImagePickerTests.m; sourceTree = ""; }; 73238D201890AD4B0047DDA0 /* DoImagePickerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DoImagePickerController.h; sourceTree = ""; }; 73238D211890AD4B0047DDA0 /* DoImagePickerController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DoImagePickerController.m; sourceTree = ""; }; - 73238D221890AD4B0047DDA0 /* DoImagePickerController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DoImagePickerController.xib; sourceTree = ""; }; 73238D281890AF010047DDA0 /* DoAlbumCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DoAlbumCell.h; sourceTree = ""; }; 73238D291890AF010047DDA0 /* DoAlbumCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DoAlbumCell.m; sourceTree = ""; }; - 73238D301890AF380047DDA0 /* DoAlbumCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DoAlbumCell.xib; sourceTree = ""; }; 73238D321890C97F0047DDA0 /* AssetHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AssetHelper.h; sourceTree = ""; }; 73238D331890C97F0047DDA0 /* AssetHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AssetHelper.m; sourceTree = ""; }; 73238D4B1890DC320047DDA0 /* DoPhotoCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DoPhotoCell.h; sourceTree = ""; }; 73238D4C1890DC320047DDA0 /* DoPhotoCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DoPhotoCell.m; sourceTree = ""; }; - 73238D4E1890DC4C0047DDA0 /* DoPhotoCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DoPhotoCell.xib; sourceTree = ""; }; 73C76E3418A109A8001C60EB /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = SOURCE_ROOT; }; 73E1110818914C260011CBD3 /* check@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "check@2x.png"; sourceTree = ""; }; 73E1110918914C260011CBD3 /* close@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "close@2x.png"; sourceTree = ""; }; @@ -95,6 +92,9 @@ 73E1111118915AEA0011CBD3 /* close.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = close.png; sourceTree = ""; }; 73E1111218915AEA0011CBD3 /* down.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = down.png; sourceTree = ""; }; 73E1111318915AEA0011CBD3 /* up.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = up.png; sourceTree = ""; }; + BF577C97192BA47800E874E6 /* DoAlbumCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DoAlbumCell.xib; sourceTree = ""; }; + BF577C98192BA47800E874E6 /* DoImagePickerController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DoImagePickerController.xib; sourceTree = ""; }; + BF577C99192BA47800E874E6 /* DoPhotoCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DoPhotoCell.xib; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -204,13 +204,10 @@ 73238D331890C97F0047DDA0 /* AssetHelper.m */, 73238D201890AD4B0047DDA0 /* DoImagePickerController.h */, 73238D211890AD4B0047DDA0 /* DoImagePickerController.m */, - 73238D221890AD4B0047DDA0 /* DoImagePickerController.xib */, 73238D281890AF010047DDA0 /* DoAlbumCell.h */, 73238D291890AF010047DDA0 /* DoAlbumCell.m */, - 73238D301890AF380047DDA0 /* DoAlbumCell.xib */, 73238D4B1890DC320047DDA0 /* DoPhotoCell.h */, 73238D4C1890DC320047DDA0 /* DoPhotoCell.m */, - 73238D4E1890DC4C0047DDA0 /* DoPhotoCell.xib */, ); path = DoImagePicker; sourceTree = ""; @@ -226,6 +223,9 @@ 73E1110718914C260011CBD3 /* Images */ = { isa = PBXGroup; children = ( + BF577C97192BA47800E874E6 /* DoAlbumCell.xib */, + BF577C98192BA47800E874E6 /* DoImagePickerController.xib */, + BF577C99192BA47800E874E6 /* DoPhotoCell.xib */, 731D67C918A087A5002BAEF6 /* line@2x.png */, 731D67CC18A0D066002BAEF6 /* show.png */, 731D67CD18A0D066002BAEF6 /* show@2x.png */, @@ -290,7 +290,7 @@ ORGANIZATIONNAME = "Seungbo Cho"; TargetAttributes = { 73238CE61890AAC60047DDA0 = { - DevelopmentTeam = GXDY7L4VT8; + DevelopmentTeam = ZRY6W7A7K7; }; 73238D071890AAC70047DDA0 = { TestTargetID = 73238CE61890AAC60047DDA0; @@ -322,22 +322,22 @@ buildActionMask = 2147483647; files = ( 73E1111718915AEA0011CBD3 /* up.png in Resources */, - 73238D311890AF380047DDA0 /* DoAlbumCell.xib in Resources */, - 73238D241890AD4B0047DDA0 /* DoImagePickerController.xib in Resources */, 73238D031890AAC70047DDA0 /* Images.xcassets in Resources */, 73E1111618915AEA0011CBD3 /* down.png in Resources */, 73E1110F18914C260011CBD3 /* up@2x.png in Resources */, + BF577C9A192BA47800E874E6 /* DoAlbumCell.xib in Resources */, 73C76E3518A109A8001C60EB /* README.md in Resources */, 73E1111418915AEA0011CBD3 /* check.png in Resources */, 73238CF51890AAC60047DDA0 /* InfoPlist.strings in Resources */, 73E1111518915AEA0011CBD3 /* close.png in Resources */, + BF577C9C192BA47800E874E6 /* DoPhotoCell.xib in Resources */, 73238CFE1890AAC60047DDA0 /* Main.storyboard in Resources */, 73E1110E18914C260011CBD3 /* down@2x.png in Resources */, 731D67CA18A087A5002BAEF6 /* line@2x.png in Resources */, 731D67CE18A0D066002BAEF6 /* show.png in Resources */, - 73238D4F1890DC4C0047DDA0 /* DoPhotoCell.xib in Resources */, 73E1110C18914C260011CBD3 /* check@2x.png in Resources */, 731D67CF18A0D066002BAEF6 /* show@2x.png in Resources */, + BF577C9B192BA47800E874E6 /* DoImagePickerController.xib in Resources */, 73E1110D18914C260011CBD3 /* close@2x.png in Resources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/ImagePicker/DoImagePicker/DoAlbumCell.m b/ImagePicker/DoImagePicker/DoAlbumCell.m index 5474ac7..6cdb9b8 100644 --- a/ImagePicker/DoImagePicker/DoAlbumCell.m +++ b/ImagePicker/DoImagePicker/DoAlbumCell.m @@ -28,14 +28,16 @@ - (void)setSelected:(BOOL)selected animated:(BOOL)animated _lbAlbumName.textColor = [UIColor whiteColor]; _lbCount.textColor = [UIColor whiteColor]; - self.contentView.backgroundColor = DO_ALBUM_NAME_TEXT_COLOR; + //self.contentView.backgroundColor = DO_ALBUM_NAME_TEXT_COLOR; + self.contentView.backgroundColor = DO_RGBA(0, 0, 0, 0.9); } else { _lbAlbumName.textColor = DO_ALBUM_NAME_TEXT_COLOR; _lbCount.textColor = DO_ALBUM_COUNT_TEXT_COLOR; - self.contentView.backgroundColor = [UIColor whiteColor]; + //self.contentView.backgroundColor = [UIColor whiteColor]; + self.contentView.backgroundColor = DO_RGBA(255, 255, 255, 0.9); } } diff --git a/ImagePicker/DoImagePicker/DoImagePickerController.h b/ImagePicker/DoImagePicker/DoImagePickerController.h index ded8a56..4bb56cc 100644 --- a/ImagePicker/DoImagePicker/DoImagePickerController.h +++ b/ImagePicker/DoImagePicker/DoImagePickerController.h @@ -10,11 +10,15 @@ #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_ALBUM_NAME_TEXT_COLOR DO_RGB(57, 185, 238) -#define DO_ALBUM_COUNT_TEXT_COLOR DO_RGB(247, 200, 142) +//#define DO_MENU_BACK_COLOR DO_RGBA(57, 185, 238, 0.98) +#define DO_MENU_BACK_COLOR DO_RGBA(0, 0, 0, 0.9) +//#define DO_SIDE_BUTTON_COLOR DO_RGBA(57, 185, 238, 0.9) +#define DO_SIDE_BUTTON_COLOR DO_RGBA(0, 0, 0, 0.9) + +//#define DO_ALBUM_NAME_TEXT_COLOR DO_RGB(57, 185, 238) +#define DO_ALBUM_NAME_TEXT_COLOR DO_RGB(0, 0, 0) +//#define DO_ALBUM_COUNT_TEXT_COLOR DO_RGB(247, 200, 142) +#define DO_ALBUM_COUNT_TEXT_COLOR DO_RGB(0, 0, 0) #define DO_BOTTOM_TEXT_COLOR DO_RGB(255, 255, 255) #define DO_PICKER_RESULT_UIIMAGE 0 diff --git a/ImagePicker/DoImagePicker/DoImagePickerController.m b/ImagePicker/DoImagePicker/DoImagePickerController.m index 3b7bcde..fe1a3e8 100644 --- a/ImagePicker/DoImagePicker/DoImagePickerController.m +++ b/ImagePicker/DoImagePicker/DoImagePickerController.m @@ -201,7 +201,8 @@ - (IBAction)onSelectAlbum:(id)sender _tvAlbumList.frame = CGRectMake(0, _vBottomMenu.frame.origin.y - _tvAlbumList.frame.size.height, _tvAlbumList.frame.size.width, _tvAlbumList.frame.size.height); - _tvAlbumList.alpha = 1.0; + //_tvAlbumList.alpha = 1.0; + _tvAlbumList.alpha = 0.7; _ivShowMark.transform = CGAffineTransformMakeRotation(M_PI); }]; diff --git a/Resources/Images/DoAlbumCell.xib b/Resources/Images/DoAlbumCell.xib new file mode 100644 index 0000000..a613b07 --- /dev/null +++ b/Resources/Images/DoAlbumCell.xib @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Resources/Images/DoImagePickerController.xib b/Resources/Images/DoImagePickerController.xib new file mode 100644 index 0000000..7480eb9 --- /dev/null +++ b/Resources/Images/DoImagePickerController.xib @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Resources/Images/DoPhotoCell.xib b/Resources/Images/DoPhotoCell.xib new file mode 100644 index 0000000..45f133a --- /dev/null +++ b/Resources/Images/DoPhotoCell.xib @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +