add
This commit is contained in:
+238
-10
@@ -91,8 +91,6 @@
|
||||
836EE5D42136454500F0ABB2 /* RegistGetSMSCodeRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 836EE5D32136454500F0ABB2 /* RegistGetSMSCodeRequest.m */; };
|
||||
836EE5D7213645E300F0ABB2 /* GiGaBaseAPiRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 836EE5D6213645E300F0ABB2 /* GiGaBaseAPiRequest.m */; };
|
||||
836EE5DA2136716100F0ABB2 /* NSTimer+Convenience.m in Sources */ = {isa = PBXBuildFile; fileRef = 836EE5D82136716000F0ABB2 /* NSTimer+Convenience.m */; };
|
||||
8376B81A2154816800AB79F8 /* SHareTestImageVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 8376B8182154816800AB79F8 /* SHareTestImageVC.m */; };
|
||||
8376B81B2154816800AB79F8 /* SHareTestImageVC.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8376B8192154816800AB79F8 /* SHareTestImageVC.xib */; };
|
||||
8376B81E2154897700AB79F8 /* GIGaUserFileHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 8376B81D2154897700AB79F8 /* GIGaUserFileHelper.m */; };
|
||||
8376B8202154913E00AB79F8 /* city.json in Resources */ = {isa = PBXBuildFile; fileRef = 8376B81F2154913E00AB79F8 /* city.json */; };
|
||||
8376B8232154927300AB79F8 /* GIGaMaskShareViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8376B8222154927300AB79F8 /* GIGaMaskShareViewController.m */; };
|
||||
@@ -113,6 +111,38 @@
|
||||
83773FBF214791E10014EE4C /* GIGaQuestionSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = 83773FBE214791E10014EE4C /* GIGaQuestionSlider.m */; };
|
||||
83773FC221479FED0014EE4C /* UIColor+HexColor.m in Sources */ = {isa = PBXBuildFile; fileRef = 83773FC121479FED0014EE4C /* UIColor+HexColor.m */; };
|
||||
83773FC52147A5CC0014EE4C /* MaskQuestionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 83773FC42147A5CC0014EE4C /* MaskQuestionView.m */; };
|
||||
8382DF9D2155F1A200BBA5A5 /* MaskTimeShareActionSheet.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DF9C2155F1A200BBA5A5 /* MaskTimeShareActionSheet.m */; };
|
||||
8382DFA12155F68800BBA5A5 /* MaskActionSheetViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DF9F2155F68800BBA5A5 /* MaskActionSheetViewCell.m */; };
|
||||
8382DFA22155F68800BBA5A5 /* MaskActionSheetViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8382DFA02155F68800BBA5A5 /* MaskActionSheetViewCell.xib */; };
|
||||
8382DFA72156247F00BBA5A5 /* GiGaFeedLeiIingViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFA52156247F00BBA5A5 /* GiGaFeedLeiIingViewCell.m */; };
|
||||
8382DFA82156247F00BBA5A5 /* GiGaFeedLeiIingViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8382DFA62156247F00BBA5A5 /* GiGaFeedLeiIingViewCell.xib */; };
|
||||
8382DFAC215626CE00BBA5A5 /* GiGaFeedContentViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFAA215626CE00BBA5A5 /* GiGaFeedContentViewCell.m */; };
|
||||
8382DFAD215626CE00BBA5A5 /* GiGaFeedContentViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8382DFAB215626CE00BBA5A5 /* GiGaFeedContentViewCell.xib */; };
|
||||
8382DFB121562B0A00BBA5A5 /* GIGaFeedQQViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFAF21562B0A00BBA5A5 /* GIGaFeedQQViewCell.m */; };
|
||||
8382DFB221562B0A00BBA5A5 /* GIGaFeedQQViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8382DFB021562B0A00BBA5A5 /* GIGaFeedQQViewCell.xib */; };
|
||||
8382DFB521562C6600BBA5A5 /* GIGaFeedPhontosViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFB421562C6600BBA5A5 /* GIGaFeedPhontosViewCell.m */; };
|
||||
8382DFB92156389200BBA5A5 /* GIGaFeedImagsCollectionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFB72156389200BBA5A5 /* GIGaFeedImagsCollectionCell.m */; };
|
||||
8382DFBA2156389200BBA5A5 /* GIGaFeedImagsCollectionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8382DFB82156389200BBA5A5 /* GIGaFeedImagsCollectionCell.xib */; };
|
||||
8382DFBE21563C2D00BBA5A5 /* GiGaFeedImagsActionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFBC21563C2D00BBA5A5 /* GiGaFeedImagsActionCell.m */; };
|
||||
8382DFBF21563C2D00BBA5A5 /* GiGaFeedImagsActionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 8382DFBD21563C2D00BBA5A5 /* GiGaFeedImagsActionCell.xib */; };
|
||||
8382DFE721564A1F00BBA5A5 /* SJPhotoPicker.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFC121564A1F00BBA5A5 /* SJPhotoPicker.m */; };
|
||||
8382DFE821564A1F00BBA5A5 /* SJPhotoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFC321564A1F00BBA5A5 /* SJPhotoModel.m */; };
|
||||
8382DFE921564A1F00BBA5A5 /* SJAlbumModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFC521564A1F00BBA5A5 /* SJAlbumModel.m */; };
|
||||
8382DFEA21564A1F00BBA5A5 /* SJPhotoAlbumsController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFC821564A1F00BBA5A5 /* SJPhotoAlbumsController.m */; };
|
||||
8382DFEB21564A1F00BBA5A5 /* SJPreviewPhotoController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFC921564A1F00BBA5A5 /* SJPreviewPhotoController.m */; };
|
||||
8382DFEC21564A1F00BBA5A5 /* SJPickPhotoController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFCB21564A1F00BBA5A5 /* SJPickPhotoController.m */; };
|
||||
8382DFED21564A1F00BBA5A5 /* SJPhotoPickerNavController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFCE21564A1F00BBA5A5 /* SJPhotoPickerNavController.m */; };
|
||||
8382DFEE21564A1F00BBA5A5 /* SJPhotoPickerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFD121564A1F00BBA5A5 /* SJPhotoPickerManager.m */; };
|
||||
8382DFEF21564A1F00BBA5A5 /* photopicker_back.png in Resources */ = {isa = PBXBuildFile; fileRef = 8382DFD721564A1F00BBA5A5 /* photopicker_back.png */; };
|
||||
8382DFF021564A1F00BBA5A5 /* photopicker_back@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8382DFD821564A1F00BBA5A5 /* photopicker_back@3x.png */; };
|
||||
8382DFF121564A1F00BBA5A5 /* photopicker_back@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 8382DFD921564A1F00BBA5A5 /* photopicker_back@2x.png */; };
|
||||
8382DFF221564A1F00BBA5A5 /* SJPickPhotoCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFDD21564A1F00BBA5A5 /* SJPickPhotoCell.m */; };
|
||||
8382DFF321564A1F00BBA5A5 /* SJPreviewPhotoCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFDE21564A1F00BBA5A5 /* SJPreviewPhotoCell.m */; };
|
||||
8382DFF421564A1F00BBA5A5 /* SJPhotoAlbumCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFDF21564A1F00BBA5A5 /* SJPhotoAlbumCell.m */; };
|
||||
8382DFF521564A1F00BBA5A5 /* SJPhotoPickerNavBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFE021564A1F00BBA5A5 /* SJPhotoPickerNavBar.m */; };
|
||||
8382DFF621564A1F00BBA5A5 /* SJPhotoPickerToolBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFE121564A1F00BBA5A5 /* SJPhotoPickerToolBar.m */; };
|
||||
8382DFF721564A1F00BBA5A5 /* SJPhotoPickerRaidoButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 8382DFE221564A1F00BBA5A5 /* SJPhotoPickerRaidoButton.m */; };
|
||||
8382DFF921564E0C00BBA5A5 /* Photos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8382DFF821564E0C00BBA5A5 /* Photos.framework */; };
|
||||
83835BA0212E43BD001480F2 /* GiGaMasssagesVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835B9F212E43BD001480F2 /* GiGaMasssagesVC.m */; };
|
||||
83835BA7212E4748001480F2 /* MAssaageCenterCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BA5212E4748001480F2 /* MAssaageCenterCell.m */; };
|
||||
83835BA8212E4748001480F2 /* MAssaageCenterCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 83835BA6212E4748001480F2 /* MAssaageCenterCell.xib */; };
|
||||
@@ -359,9 +389,6 @@
|
||||
836EE5D6213645E300F0ABB2 /* GiGaBaseAPiRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaBaseAPiRequest.m; sourceTree = "<group>"; };
|
||||
836EE5D82136716000F0ABB2 /* NSTimer+Convenience.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSTimer+Convenience.m"; sourceTree = "<group>"; };
|
||||
836EE5D92136716000F0ABB2 /* NSTimer+Convenience.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSTimer+Convenience.h"; sourceTree = "<group>"; };
|
||||
8376B8172154816800AB79F8 /* SHareTestImageVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SHareTestImageVC.h; sourceTree = "<group>"; };
|
||||
8376B8182154816800AB79F8 /* SHareTestImageVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SHareTestImageVC.m; sourceTree = "<group>"; };
|
||||
8376B8192154816800AB79F8 /* SHareTestImageVC.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SHareTestImageVC.xib; sourceTree = "<group>"; };
|
||||
8376B81C2154897700AB79F8 /* GIGaUserFileHelper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GIGaUserFileHelper.h; sourceTree = "<group>"; };
|
||||
8376B81D2154897700AB79F8 /* GIGaUserFileHelper.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GIGaUserFileHelper.m; sourceTree = "<group>"; };
|
||||
8376B81F2154913E00AB79F8 /* city.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = city.json; sourceTree = "<group>"; };
|
||||
@@ -396,6 +423,61 @@
|
||||
83773FC121479FED0014EE4C /* UIColor+HexColor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIColor+HexColor.m"; sourceTree = "<group>"; };
|
||||
83773FC32147A5CC0014EE4C /* MaskQuestionView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MaskQuestionView.h; sourceTree = "<group>"; };
|
||||
83773FC42147A5CC0014EE4C /* MaskQuestionView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MaskQuestionView.m; sourceTree = "<group>"; };
|
||||
8382DF9B2155F1A200BBA5A5 /* MaskTimeShareActionSheet.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MaskTimeShareActionSheet.h; sourceTree = "<group>"; };
|
||||
8382DF9C2155F1A200BBA5A5 /* MaskTimeShareActionSheet.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MaskTimeShareActionSheet.m; sourceTree = "<group>"; };
|
||||
8382DF9E2155F68800BBA5A5 /* MaskActionSheetViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MaskActionSheetViewCell.h; sourceTree = "<group>"; };
|
||||
8382DF9F2155F68800BBA5A5 /* MaskActionSheetViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MaskActionSheetViewCell.m; sourceTree = "<group>"; };
|
||||
8382DFA02155F68800BBA5A5 /* MaskActionSheetViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MaskActionSheetViewCell.xib; sourceTree = "<group>"; };
|
||||
8382DFA42156247F00BBA5A5 /* GiGaFeedLeiIingViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaFeedLeiIingViewCell.h; sourceTree = "<group>"; };
|
||||
8382DFA52156247F00BBA5A5 /* GiGaFeedLeiIingViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaFeedLeiIingViewCell.m; sourceTree = "<group>"; };
|
||||
8382DFA62156247F00BBA5A5 /* GiGaFeedLeiIingViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GiGaFeedLeiIingViewCell.xib; sourceTree = "<group>"; };
|
||||
8382DFA9215626CE00BBA5A5 /* GiGaFeedContentViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaFeedContentViewCell.h; sourceTree = "<group>"; };
|
||||
8382DFAA215626CE00BBA5A5 /* GiGaFeedContentViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaFeedContentViewCell.m; sourceTree = "<group>"; };
|
||||
8382DFAB215626CE00BBA5A5 /* GiGaFeedContentViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GiGaFeedContentViewCell.xib; sourceTree = "<group>"; };
|
||||
8382DFAE21562B0A00BBA5A5 /* GIGaFeedQQViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GIGaFeedQQViewCell.h; sourceTree = "<group>"; };
|
||||
8382DFAF21562B0A00BBA5A5 /* GIGaFeedQQViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GIGaFeedQQViewCell.m; sourceTree = "<group>"; };
|
||||
8382DFB021562B0A00BBA5A5 /* GIGaFeedQQViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GIGaFeedQQViewCell.xib; sourceTree = "<group>"; };
|
||||
8382DFB321562C6600BBA5A5 /* GIGaFeedPhontosViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GIGaFeedPhontosViewCell.h; sourceTree = "<group>"; };
|
||||
8382DFB421562C6600BBA5A5 /* GIGaFeedPhontosViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GIGaFeedPhontosViewCell.m; sourceTree = "<group>"; };
|
||||
8382DFB62156389200BBA5A5 /* GIGaFeedImagsCollectionCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GIGaFeedImagsCollectionCell.h; sourceTree = "<group>"; };
|
||||
8382DFB72156389200BBA5A5 /* GIGaFeedImagsCollectionCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GIGaFeedImagsCollectionCell.m; sourceTree = "<group>"; };
|
||||
8382DFB82156389200BBA5A5 /* GIGaFeedImagsCollectionCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GIGaFeedImagsCollectionCell.xib; sourceTree = "<group>"; };
|
||||
8382DFBB21563C2D00BBA5A5 /* GiGaFeedImagsActionCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaFeedImagsActionCell.h; sourceTree = "<group>"; };
|
||||
8382DFBC21563C2D00BBA5A5 /* GiGaFeedImagsActionCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaFeedImagsActionCell.m; sourceTree = "<group>"; };
|
||||
8382DFBD21563C2D00BBA5A5 /* GiGaFeedImagsActionCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = GiGaFeedImagsActionCell.xib; sourceTree = "<group>"; };
|
||||
8382DFC121564A1F00BBA5A5 /* SJPhotoPicker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SJPhotoPicker.m; sourceTree = "<group>"; };
|
||||
8382DFC321564A1F00BBA5A5 /* SJPhotoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SJPhotoModel.m; sourceTree = "<group>"; };
|
||||
8382DFC421564A1F00BBA5A5 /* SJAlbumModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SJAlbumModel.h; sourceTree = "<group>"; };
|
||||
8382DFC521564A1F00BBA5A5 /* SJAlbumModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SJAlbumModel.m; sourceTree = "<group>"; };
|
||||
8382DFC621564A1F00BBA5A5 /* SJPhotoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SJPhotoModel.h; sourceTree = "<group>"; };
|
||||
8382DFC821564A1F00BBA5A5 /* SJPhotoAlbumsController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SJPhotoAlbumsController.m; sourceTree = "<group>"; };
|
||||
8382DFC921564A1F00BBA5A5 /* SJPreviewPhotoController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SJPreviewPhotoController.m; sourceTree = "<group>"; };
|
||||
8382DFCA21564A1F00BBA5A5 /* SJPhotoPickerNavController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SJPhotoPickerNavController.h; sourceTree = "<group>"; };
|
||||
8382DFCB21564A1F00BBA5A5 /* SJPickPhotoController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SJPickPhotoController.m; sourceTree = "<group>"; };
|
||||
8382DFCC21564A1F00BBA5A5 /* SJPreviewPhotoController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SJPreviewPhotoController.h; sourceTree = "<group>"; };
|
||||
8382DFCD21564A1F00BBA5A5 /* SJPhotoAlbumsController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SJPhotoAlbumsController.h; sourceTree = "<group>"; };
|
||||
8382DFCE21564A1F00BBA5A5 /* SJPhotoPickerNavController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SJPhotoPickerNavController.m; sourceTree = "<group>"; };
|
||||
8382DFCF21564A1F00BBA5A5 /* SJPickPhotoController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SJPickPhotoController.h; sourceTree = "<group>"; };
|
||||
8382DFD121564A1F00BBA5A5 /* SJPhotoPickerManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SJPhotoPickerManager.m; sourceTree = "<group>"; };
|
||||
8382DFD221564A1F00BBA5A5 /* SJPhotoPickerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SJPhotoPickerManager.h; sourceTree = "<group>"; };
|
||||
8382DFD421564A1F00BBA5A5 /* SJPhotoPickerMacro.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SJPhotoPickerMacro.h; sourceTree = "<group>"; };
|
||||
8382DFD521564A1F00BBA5A5 /* SJPhotoPicker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SJPhotoPicker.h; sourceTree = "<group>"; };
|
||||
8382DFD721564A1F00BBA5A5 /* photopicker_back.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = photopicker_back.png; sourceTree = "<group>"; };
|
||||
8382DFD821564A1F00BBA5A5 /* photopicker_back@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "photopicker_back@3x.png"; sourceTree = "<group>"; };
|
||||
8382DFD921564A1F00BBA5A5 /* photopicker_back@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "photopicker_back@2x.png"; sourceTree = "<group>"; };
|
||||
8382DFDB21564A1F00BBA5A5 /* SJPhotoPickerRaidoButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SJPhotoPickerRaidoButton.h; sourceTree = "<group>"; };
|
||||
8382DFDC21564A1F00BBA5A5 /* SJPhotoPickerToolBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SJPhotoPickerToolBar.h; sourceTree = "<group>"; };
|
||||
8382DFDD21564A1F00BBA5A5 /* SJPickPhotoCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SJPickPhotoCell.m; sourceTree = "<group>"; };
|
||||
8382DFDE21564A1F00BBA5A5 /* SJPreviewPhotoCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SJPreviewPhotoCell.m; sourceTree = "<group>"; };
|
||||
8382DFDF21564A1F00BBA5A5 /* SJPhotoAlbumCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SJPhotoAlbumCell.m; sourceTree = "<group>"; };
|
||||
8382DFE021564A1F00BBA5A5 /* SJPhotoPickerNavBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SJPhotoPickerNavBar.m; sourceTree = "<group>"; };
|
||||
8382DFE121564A1F00BBA5A5 /* SJPhotoPickerToolBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SJPhotoPickerToolBar.m; sourceTree = "<group>"; };
|
||||
8382DFE221564A1F00BBA5A5 /* SJPhotoPickerRaidoButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SJPhotoPickerRaidoButton.m; sourceTree = "<group>"; };
|
||||
8382DFE321564A1F00BBA5A5 /* SJPhotoPickerNavBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SJPhotoPickerNavBar.h; sourceTree = "<group>"; };
|
||||
8382DFE421564A1F00BBA5A5 /* SJPhotoAlbumCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SJPhotoAlbumCell.h; sourceTree = "<group>"; };
|
||||
8382DFE521564A1F00BBA5A5 /* SJPreviewPhotoCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SJPreviewPhotoCell.h; sourceTree = "<group>"; };
|
||||
8382DFE621564A1F00BBA5A5 /* SJPickPhotoCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SJPickPhotoCell.h; sourceTree = "<group>"; };
|
||||
8382DFF821564E0C00BBA5A5 /* Photos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Photos.framework; path = System/Library/Frameworks/Photos.framework; sourceTree = SDKROOT; };
|
||||
83835B9E212E43BD001480F2 /* GiGaMasssagesVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMasssagesVC.h; sourceTree = "<group>"; };
|
||||
83835B9F212E43BD001480F2 /* GiGaMasssagesVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaMasssagesVC.m; sourceTree = "<group>"; };
|
||||
83835BA4212E4748001480F2 /* MAssaageCenterCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MAssaageCenterCell.h; sourceTree = "<group>"; };
|
||||
@@ -557,6 +639,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8382DFF921564E0C00BBA5A5 /* Photos.framework in Frameworks */,
|
||||
8361B41721217DA000238FEB /* Foundation.framework in Frameworks */,
|
||||
8357ADD52123F5EC000816F2 /* libsqlite3.tbd in Frameworks */,
|
||||
8361B42321217DFF00238FEB /* libresolv.tbd in Frameworks */,
|
||||
@@ -654,6 +737,7 @@
|
||||
8340BFAC213E7374008F22E4 /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8382DFC021564A1F00BBA5A5 /* SJPhotoPicker */,
|
||||
833DE8E02150169F009D4329 /* JYAddressPicker */,
|
||||
83901143214E20B1004CA790 /* LYSDatePickerController */,
|
||||
8338F6B62142504E00B4780B /* CustomSwitch */,
|
||||
@@ -990,6 +1074,7 @@
|
||||
8361B42A212180A100238FEB /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8382DFA3215622C600BBA5A5 /* FeedViews */,
|
||||
8342FD7E2150F94F00D141F4 /* AppVerionDescCells */,
|
||||
838762CF214B9CAA0039D241 /* userInfoView */,
|
||||
83BFAE64213CCF10004EF801 /* GiGaMineUserViewCell.h */,
|
||||
@@ -1089,10 +1174,126 @@
|
||||
8376B8422154CEC800AB79F8 /* MaskShareBoootomViewCell.h */,
|
||||
8376B8432154CEC800AB79F8 /* MaskShareBoootomViewCell.m */,
|
||||
8376B8442154CEC800AB79F8 /* MaskShareBoootomViewCell.xib */,
|
||||
8382DF9B2155F1A200BBA5A5 /* MaskTimeShareActionSheet.h */,
|
||||
8382DF9C2155F1A200BBA5A5 /* MaskTimeShareActionSheet.m */,
|
||||
8382DF9E2155F68800BBA5A5 /* MaskActionSheetViewCell.h */,
|
||||
8382DF9F2155F68800BBA5A5 /* MaskActionSheetViewCell.m */,
|
||||
8382DFA02155F68800BBA5A5 /* MaskActionSheetViewCell.xib */,
|
||||
);
|
||||
path = MaskSharesViews;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8382DFA3215622C600BBA5A5 /* FeedViews */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8382DFA42156247F00BBA5A5 /* GiGaFeedLeiIingViewCell.h */,
|
||||
8382DFA52156247F00BBA5A5 /* GiGaFeedLeiIingViewCell.m */,
|
||||
8382DFA62156247F00BBA5A5 /* GiGaFeedLeiIingViewCell.xib */,
|
||||
8382DFA9215626CE00BBA5A5 /* GiGaFeedContentViewCell.h */,
|
||||
8382DFAA215626CE00BBA5A5 /* GiGaFeedContentViewCell.m */,
|
||||
8382DFAB215626CE00BBA5A5 /* GiGaFeedContentViewCell.xib */,
|
||||
8382DFAE21562B0A00BBA5A5 /* GIGaFeedQQViewCell.h */,
|
||||
8382DFAF21562B0A00BBA5A5 /* GIGaFeedQQViewCell.m */,
|
||||
8382DFB021562B0A00BBA5A5 /* GIGaFeedQQViewCell.xib */,
|
||||
8382DFB321562C6600BBA5A5 /* GIGaFeedPhontosViewCell.h */,
|
||||
8382DFB421562C6600BBA5A5 /* GIGaFeedPhontosViewCell.m */,
|
||||
8382DFB62156389200BBA5A5 /* GIGaFeedImagsCollectionCell.h */,
|
||||
8382DFB72156389200BBA5A5 /* GIGaFeedImagsCollectionCell.m */,
|
||||
8382DFB82156389200BBA5A5 /* GIGaFeedImagsCollectionCell.xib */,
|
||||
8382DFBB21563C2D00BBA5A5 /* GiGaFeedImagsActionCell.h */,
|
||||
8382DFBC21563C2D00BBA5A5 /* GiGaFeedImagsActionCell.m */,
|
||||
8382DFBD21563C2D00BBA5A5 /* GiGaFeedImagsActionCell.xib */,
|
||||
);
|
||||
path = FeedViews;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8382DFC021564A1F00BBA5A5 /* SJPhotoPicker */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8382DFC121564A1F00BBA5A5 /* SJPhotoPicker.m */,
|
||||
8382DFC221564A1F00BBA5A5 /* Models */,
|
||||
8382DFC721564A1F00BBA5A5 /* Controller */,
|
||||
8382DFD021564A1F00BBA5A5 /* Manager */,
|
||||
8382DFD321564A1F00BBA5A5 /* Macro */,
|
||||
8382DFD521564A1F00BBA5A5 /* SJPhotoPicker.h */,
|
||||
8382DFD621564A1F00BBA5A5 /* Sources */,
|
||||
8382DFDA21564A1F00BBA5A5 /* Views */,
|
||||
);
|
||||
path = SJPhotoPicker;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8382DFC221564A1F00BBA5A5 /* Models */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8382DFC321564A1F00BBA5A5 /* SJPhotoModel.m */,
|
||||
8382DFC421564A1F00BBA5A5 /* SJAlbumModel.h */,
|
||||
8382DFC521564A1F00BBA5A5 /* SJAlbumModel.m */,
|
||||
8382DFC621564A1F00BBA5A5 /* SJPhotoModel.h */,
|
||||
);
|
||||
path = Models;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8382DFC721564A1F00BBA5A5 /* Controller */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8382DFC821564A1F00BBA5A5 /* SJPhotoAlbumsController.m */,
|
||||
8382DFC921564A1F00BBA5A5 /* SJPreviewPhotoController.m */,
|
||||
8382DFCA21564A1F00BBA5A5 /* SJPhotoPickerNavController.h */,
|
||||
8382DFCB21564A1F00BBA5A5 /* SJPickPhotoController.m */,
|
||||
8382DFCC21564A1F00BBA5A5 /* SJPreviewPhotoController.h */,
|
||||
8382DFCD21564A1F00BBA5A5 /* SJPhotoAlbumsController.h */,
|
||||
8382DFCE21564A1F00BBA5A5 /* SJPhotoPickerNavController.m */,
|
||||
8382DFCF21564A1F00BBA5A5 /* SJPickPhotoController.h */,
|
||||
);
|
||||
path = Controller;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8382DFD021564A1F00BBA5A5 /* Manager */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8382DFD121564A1F00BBA5A5 /* SJPhotoPickerManager.m */,
|
||||
8382DFD221564A1F00BBA5A5 /* SJPhotoPickerManager.h */,
|
||||
);
|
||||
path = Manager;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8382DFD321564A1F00BBA5A5 /* Macro */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8382DFD421564A1F00BBA5A5 /* SJPhotoPickerMacro.h */,
|
||||
);
|
||||
path = Macro;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8382DFD621564A1F00BBA5A5 /* Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8382DFD721564A1F00BBA5A5 /* photopicker_back.png */,
|
||||
8382DFD821564A1F00BBA5A5 /* photopicker_back@3x.png */,
|
||||
8382DFD921564A1F00BBA5A5 /* photopicker_back@2x.png */,
|
||||
);
|
||||
path = Sources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8382DFDA21564A1F00BBA5A5 /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8382DFDB21564A1F00BBA5A5 /* SJPhotoPickerRaidoButton.h */,
|
||||
8382DFDC21564A1F00BBA5A5 /* SJPhotoPickerToolBar.h */,
|
||||
8382DFDD21564A1F00BBA5A5 /* SJPickPhotoCell.m */,
|
||||
8382DFDE21564A1F00BBA5A5 /* SJPreviewPhotoCell.m */,
|
||||
8382DFDF21564A1F00BBA5A5 /* SJPhotoAlbumCell.m */,
|
||||
8382DFE021564A1F00BBA5A5 /* SJPhotoPickerNavBar.m */,
|
||||
8382DFE121564A1F00BBA5A5 /* SJPhotoPickerToolBar.m */,
|
||||
8382DFE221564A1F00BBA5A5 /* SJPhotoPickerRaidoButton.m */,
|
||||
8382DFE321564A1F00BBA5A5 /* SJPhotoPickerNavBar.h */,
|
||||
8382DFE421564A1F00BBA5A5 /* SJPhotoAlbumCell.h */,
|
||||
8382DFE521564A1F00BBA5A5 /* SJPreviewPhotoCell.h */,
|
||||
8382DFE621564A1F00BBA5A5 /* SJPickPhotoCell.h */,
|
||||
);
|
||||
path = Views;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
83835B9D212E4335001480F2 /* MessageCenter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -1157,9 +1358,6 @@
|
||||
83835BC2212E677C001480F2 /* GiGaQuestionVC.m */,
|
||||
8384643F214A4BFF00F12B33 /* MaskTestResultVC.h */,
|
||||
83846440214A4BFF00F12B33 /* MaskTestResultVC.m */,
|
||||
8376B8172154816800AB79F8 /* SHareTestImageVC.h */,
|
||||
8376B8182154816800AB79F8 /* SHareTestImageVC.m */,
|
||||
8376B8192154816800AB79F8 /* SHareTestImageVC.xib */,
|
||||
);
|
||||
path = Controller;
|
||||
sourceTree = "<group>";
|
||||
@@ -1417,6 +1615,7 @@
|
||||
F3264CFCC2F2D369DC49BD1A /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8382DFF821564E0C00BBA5A5 /* Photos.framework */,
|
||||
8376B87C2154F0B100AB79F8 /* JSONModel.framework */,
|
||||
8357ADD42123F5EC000816F2 /* libsqlite3.tbd */,
|
||||
8361B42221217DFF00238FEB /* libresolv.tbd */,
|
||||
@@ -1546,22 +1745,26 @@
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8382DFBF21563C2D00BBA5A5 /* GiGaFeedImagsActionCell.xib in Resources */,
|
||||
8376B8292154A0A200AB79F8 /* MaskTimeEndViewImgaeCell.xib in Resources */,
|
||||
83346AC6212BBC8C0054D597 /* GiGaRegistViewController.xib in Resources */,
|
||||
8351474C21523B7400B25A88 /* GIGaUserChangeMobleCell.xib in Resources */,
|
||||
8376B83C2154CE8C00AB79F8 /* MaskTimeShareViewCell.xib in Resources */,
|
||||
838762DE214B9F140039D241 /* GIGaUserWeChatViewCell.xib in Resources */,
|
||||
83BFAE6D213CD0E3004EF801 /* GiGaMineInfoViewCell.xib in Resources */,
|
||||
8376B81B2154816800AB79F8 /* SHareTestImageVC.xib in Resources */,
|
||||
8382DFA82156247F00BBA5A5 /* GiGaFeedLeiIingViewCell.xib in Resources */,
|
||||
8376B82E2154A35100AB79F8 /* MaskTimeTimeViewCell.xib in Resources */,
|
||||
8361B3D6212155C300238FEB /* LaunchScreen.storyboard in Resources */,
|
||||
838762E3214B9F580039D241 /* GiGaUserSexViewCell.xib in Resources */,
|
||||
838388DA2130046D00D14C53 /* emojizone.mp4 in Resources */,
|
||||
83A22720212AC8C100B3E75C /* GiGaUserLoginVC.xib in Resources */,
|
||||
838762D4214B9D120039D241 /* GIGaUserInfoAvatorCell.xib in Resources */,
|
||||
8382DFBA2156389200BBA5A5 /* GIGaFeedImagsCollectionCell.xib in Resources */,
|
||||
838388C4212F934400D14C53 /* pomodoSound.m4a in Resources */,
|
||||
8382DFF021564A1F00BBA5A5 /* photopicker_back@3x.png in Resources */,
|
||||
8376B8462154CEC800AB79F8 /* MaskShareBoootomViewCell.xib in Resources */,
|
||||
83BFAE78213CDE91004EF801 /* GiGaSettingsViewCell.xib in Resources */,
|
||||
8382DFA22155F68800BBA5A5 /* MaskActionSheetViewCell.xib in Resources */,
|
||||
83346AC1212BB50A0054D597 /* PassWordResetVC.xib in Resources */,
|
||||
83BDC0592147B89900E74E0D /* GiGaAnswerViewCell.xib in Resources */,
|
||||
8351473D215215C500B25A88 /* GiGAUserInfoCell.xib in Resources */,
|
||||
@@ -1570,9 +1773,11 @@
|
||||
838762D9214B9EF80039D241 /* GIGaUserIDViewCell.xib in Resources */,
|
||||
838762E8214B9FA60039D241 /* GIGaUserCityViewCell.xib in Resources */,
|
||||
8342FD8B2151095100D141F4 /* AppVersionLogoCell.xib in Resources */,
|
||||
8382DFEF21564A1F00BBA5A5 /* photopicker_back.png in Resources */,
|
||||
83BFAE68213CCF10004EF801 /* GiGaMineUserViewCell.xib in Resources */,
|
||||
8376B8202154913E00AB79F8 /* city.json in Resources */,
|
||||
8351474221521C2A00B25A88 /* GIGaChangePassVC.xib in Resources */,
|
||||
8382DFAD215626CE00BBA5A5 /* GiGaFeedContentViewCell.xib in Resources */,
|
||||
8340BFA9213E65CA008F22E4 /* GIGACommonLocalizabe.strings in Resources */,
|
||||
83835BA8212E4748001480F2 /* MAssaageCenterCell.xib in Resources */,
|
||||
8361B3D3212155C300238FEB /* Assets.xcassets in Resources */,
|
||||
@@ -1584,6 +1789,8 @@
|
||||
83835BB0212E4FCD001480F2 /* MessageListViewCell.xib in Resources */,
|
||||
835147322151E4EF00B25A88 /* GIGaAboutUsVC.xib in Resources */,
|
||||
8342FD832150FA1500D141F4 /* AppVersionDescCell.xib in Resources */,
|
||||
8382DFF121564A1F00BBA5A5 /* photopicker_back@2x.png in Resources */,
|
||||
8382DFB221562B0A00BBA5A5 /* GIGaFeedQQViewCell.xib in Resources */,
|
||||
8338F6B12142182200B4780B /* MaskTime.png in Resources */,
|
||||
83346ACF212BD7830054D597 /* GiGaWebViewController.xib in Resources */,
|
||||
);
|
||||
@@ -1684,6 +1891,7 @@
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
835060AD212D4D0C007E6220 /* GiGaFileNanager.m in Sources */,
|
||||
8382DFF621564A1F00BBA5A5 /* SJPhotoPickerToolBar.m in Sources */,
|
||||
83846441214A4BFF00F12B33 /* MaskTestResultVC.m in Sources */,
|
||||
83346AC5212BBC8C0054D597 /* GiGaRegistViewController.m in Sources */,
|
||||
83346AD7212C18F50054D597 /* GiGaAppGaurdVC.m in Sources */,
|
||||
@@ -1695,6 +1903,8 @@
|
||||
838762D8214B9EF80039D241 /* GIGaUserIDViewCell.m in Sources */,
|
||||
838500DC2137F3F7003514A3 /* GiGaAttributedLabel.m in Sources */,
|
||||
83BFAE7B213D3F3A004EF801 /* MaskTimeCircularProgressView.m in Sources */,
|
||||
8382DFF721564A1F00BBA5A5 /* SJPhotoPickerRaidoButton.m in Sources */,
|
||||
8382DFF321564A1F00BBA5A5 /* SJPreviewPhotoCell.m in Sources */,
|
||||
8314D2112133ABE500B458BF /* WeiIXinApiManager.m in Sources */,
|
||||
83BDC0582147B89900E74E0D /* GiGaAnswerViewCell.m in Sources */,
|
||||
83BC8A862148BE8A00820437 /* NYSliderPopover.m in Sources */,
|
||||
@@ -1718,10 +1928,14 @@
|
||||
8384F0E821533528002C19F0 /* MaskResultPercentCell.m in Sources */,
|
||||
83835BB3212E50ED001480F2 /* ActiveMesagelistVC.m in Sources */,
|
||||
83835BC3212E677C001480F2 /* GiGaQuestionVC.m in Sources */,
|
||||
8382DFB121562B0A00BBA5A5 /* GIGaFeedQQViewCell.m in Sources */,
|
||||
83A2271F212AC8C100B3E75C /* GiGaUserLoginVC.m in Sources */,
|
||||
83901177214E20B2004CA790 /* LYSDatePickerTypeTimeDelegate.m in Sources */,
|
||||
8382DFB521562C6600BBA5A5 /* GIGaFeedPhontosViewCell.m in Sources */,
|
||||
83346ACE212BD7830054D597 /* GiGaWebViewController.m in Sources */,
|
||||
8357ADD82124027D000816F2 /* GiGaUserDefault.m in Sources */,
|
||||
8382DFE821564A1F00BBA5A5 /* SJPhotoModel.m in Sources */,
|
||||
8382DFF521564A1F00BBA5A5 /* SJPhotoPickerNavBar.m in Sources */,
|
||||
8384F0F121538146002C19F0 /* MaskResultCandView.m in Sources */,
|
||||
83835BB6212E5174001480F2 /* GiGaServiceViewController.m in Sources */,
|
||||
835147352152003700B25A88 /* GiGaFeedBackViewController.m in Sources */,
|
||||
@@ -1739,7 +1953,9 @@
|
||||
83901178214E20B2004CA790 /* LYSDatePickerItem.m in Sources */,
|
||||
8342FD8A2151095100D141F4 /* AppVersionLogoCell.m in Sources */,
|
||||
8384F0EB21533542002C19F0 /* MaskResultMinViewCell.m in Sources */,
|
||||
8382DFE921564A1F00BBA5A5 /* SJAlbumModel.m in Sources */,
|
||||
83773FC221479FED0014EE4C /* UIColor+HexColor.m in Sources */,
|
||||
8382DFEE21564A1F00BBA5A5 /* SJPhotoPickerManager.m in Sources */,
|
||||
83901172214E20B2004CA790 /* LYSDatePickerTypeDayAndTimeDelegate.m in Sources */,
|
||||
835060A9212D38EE007E6220 /* GiGaStartAdView.m in Sources */,
|
||||
83928FFA2134D8F60077D2E8 /* GiGaFlyingCommitInputView.m in Sources */,
|
||||
@@ -1753,20 +1969,24 @@
|
||||
8376B8452154CEC800AB79F8 /* MaskShareBoootomViewCell.m in Sources */,
|
||||
83835BD0212E8B9C001480F2 /* GiGaQuestionModel.m in Sources */,
|
||||
83835BAF212E4FCD001480F2 /* MessageListViewCell.m in Sources */,
|
||||
8382DFF221564A1F00BBA5A5 /* SJPickPhotoCell.m in Sources */,
|
||||
8361B3D9212155C300238FEB /* main.m in Sources */,
|
||||
83773FBF214791E10014EE4C /* GIGaQuestionSlider.m in Sources */,
|
||||
83901179214E20B2004CA790 /* LYSDatePickerTypeBase.m in Sources */,
|
||||
835060A2212D1225007E6220 /* GiGaMeViewController.m in Sources */,
|
||||
8361B3CB212155C200238FEB /* AppDelegate.m in Sources */,
|
||||
8382DFB92156389200BBA5A5 /* GIGaFeedImagsCollectionCell.m in Sources */,
|
||||
8351474621521CC500B25A88 /* GiGaChangePhoneNumberVC.m in Sources */,
|
||||
838388C8212F9C4200D14C53 /* GiGaLocalNotificationManager.m in Sources */,
|
||||
83835BBC212E60E5001480F2 /* MessageDetailViewController.m in Sources */,
|
||||
8382DF9D2155F1A200BBA5A5 /* MaskTimeShareActionSheet.m in Sources */,
|
||||
8382DFEC21564A1F00BBA5A5 /* SJPickPhotoController.m in Sources */,
|
||||
83835BCD212E856A001480F2 /* NSString+MD5.m in Sources */,
|
||||
8340BFA2213E60DD008F22E4 /* GIGAMBHUDHelper.m in Sources */,
|
||||
8376B8322154A39200AB79F8 /* MaskTimeEndActionViewCell.m in Sources */,
|
||||
8345C13621414D3B00051717 /* NSString+Unicode.m in Sources */,
|
||||
8376B81A2154816800AB79F8 /* SHareTestImageVC.m in Sources */,
|
||||
83835BC7212E7BBF001480F2 /* GiGaNavTitileView.m in Sources */,
|
||||
8382DFBE21563C2D00BBA5A5 /* GiGaFeedImagsActionCell.m in Sources */,
|
||||
8361B4322121832800238FEB /* GiGaBaseViewController.m in Sources */,
|
||||
8338F6B92142504E00B4780B /* LXCustomSwith.m in Sources */,
|
||||
8357ADD32123C7C6000816F2 /* GiGaAPIResult.m in Sources */,
|
||||
@@ -1783,14 +2003,17 @@
|
||||
83BFAE67213CCF10004EF801 /* GiGaMineUserViewCell.m in Sources */,
|
||||
8392900C2134F9F80077D2E8 /* GiGaCommentView.m in Sources */,
|
||||
839290062134F4240077D2E8 /* LXDanMuManager.m in Sources */,
|
||||
8382DFEB21564A1F00BBA5A5 /* SJPreviewPhotoController.m in Sources */,
|
||||
8376B81E2154897700AB79F8 /* GIGaUserFileHelper.m in Sources */,
|
||||
8376B8362154C74300AB79F8 /* ShareViewController.m in Sources */,
|
||||
833DE8E52150169F009D4329 /* JYAddressPicker.m in Sources */,
|
||||
834127212152AEFB001DDB36 /* GIGaMaskTimeUseRecordVC.m in Sources */,
|
||||
83901171214E20B2004CA790 /* LYSDatePickerLabel.m in Sources */,
|
||||
838762E2214B9F580039D241 /* GiGaUserSexViewCell.m in Sources */,
|
||||
8382DFAC215626CE00BBA5A5 /* GiGaFeedContentViewCell.m in Sources */,
|
||||
839290052134F4240077D2E8 /* LXDanMuTrackView.m in Sources */,
|
||||
83E40B2F21218BA0008149C4 /* GiGaUserViewController.m in Sources */,
|
||||
8382DFE721564A1F00BBA5A5 /* SJPhotoPicker.m in Sources */,
|
||||
83901170214E20B2004CA790 /* LYSDateHeaderViewController.m in Sources */,
|
||||
835060A5212D3536007E6220 /* AppDelegate+GiGaConfig.m in Sources */,
|
||||
835147312151E4EF00B25A88 /* GIGaAboutUsVC.m in Sources */,
|
||||
@@ -1805,14 +2028,19 @@
|
||||
836EE5D42136454500F0ABB2 /* RegistGetSMSCodeRequest.m in Sources */,
|
||||
8361B42E2121812000238FEB /* GiGaServerConfig.m in Sources */,
|
||||
838762DD214B9F140039D241 /* GIGaUserWeChatViewCell.m in Sources */,
|
||||
8382DFA72156247F00BBA5A5 /* GiGaFeedLeiIingViewCell.m in Sources */,
|
||||
8382DFA12155F68800BBA5A5 /* MaskActionSheetViewCell.m in Sources */,
|
||||
8340BFAF213E739D008F22E4 /* GiGaNoNetWorkView.m in Sources */,
|
||||
836EE5DA2136716100F0ABB2 /* NSTimer+Convenience.m in Sources */,
|
||||
83A22712212A9EA900B3E75C /* UIView+Sizes.m in Sources */,
|
||||
839290092134F4C40077D2E8 /* GiGaFlingCommitVC.m in Sources */,
|
||||
83BFAE70213CDB29004EF801 /* GiMaskTimeHistoryVC.m in Sources */,
|
||||
8382DFEA21564A1F00BBA5A5 /* SJPhotoAlbumsController.m in Sources */,
|
||||
83A22718212ABDFF00B3E75C /* GiGaBlockButton.m in Sources */,
|
||||
8382DFED21564A1F00BBA5A5 /* SJPhotoPickerNavController.m in Sources */,
|
||||
83928FFE2134F37D0077D2E8 /* GiGaSocketRocketUtility.m in Sources */,
|
||||
83A2270C212A97ED00B3E75C /* MaskViewBootomWaringView.m in Sources */,
|
||||
8382DFF421564A1F00BBA5A5 /* SJPhotoAlbumCell.m in Sources */,
|
||||
8390117A214E20B2004CA790 /* LYSDatePickerController.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "app_logo@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "bg_moreandmore_red@2x.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 818 B |
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_camera@2x.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.4 KiB |
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "img_holder@2x.png",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
@@ -228,11 +228,10 @@
|
||||
if (jsonString == nil) {
|
||||
return nil;
|
||||
}
|
||||
//⚠️ 13.2.0库编码采用 isoLatin1
|
||||
//⚠️
|
||||
|
||||
NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
|
||||
|
||||
//NSData *jsonData = [jsonString dataUsingEncoding:NSISOLatin1StringEncoding];
|
||||
NSError *err;
|
||||
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData
|
||||
options:NSJSONReadingMutableContainers
|
||||
|
||||
@@ -22,10 +22,15 @@ typedef void (^responseBlock)(NSDictionary *responseDict, NSDictionary *response
|
||||
// 测试题 , 登录 body 传参
|
||||
+(void)userbodyRequest:(NSString *)url params:(NSDictionary *)param completionHandler:(nullable void (^)(NSURLResponse *response, NSDictionary *resDic, NSError * _Nullable error))completionHandler;
|
||||
|
||||
//上传图片
|
||||
//上传图片 1张
|
||||
+(void)uploadImage:(NSString *)url
|
||||
imgData:(NSData *)imgData
|
||||
parms:(NSDictionary *)parms
|
||||
responseBlock:(responseBlock)block;
|
||||
|
||||
+(void)uploadImage:(NSString *)url
|
||||
imageNames:(NSArray *)imageNames
|
||||
parms:(NSDictionary *)parms
|
||||
responseBlock:(responseBlock)block;
|
||||
|
||||
@end
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#import "AFNetworking.h"
|
||||
#import "GiGaServerConfig.h"
|
||||
#import "GiGaUserDefault.h"
|
||||
|
||||
#import "GIGaUserFileHelper.h"
|
||||
@interface GiGaNetManager()
|
||||
|
||||
@end
|
||||
@@ -130,7 +130,7 @@
|
||||
[task resume];
|
||||
|
||||
}
|
||||
|
||||
//上传1张
|
||||
+(void)uploadImage:(NSString *)url
|
||||
imgData:(NSData *)imgData
|
||||
parms:(NSDictionary *)parms
|
||||
@@ -182,6 +182,55 @@
|
||||
}];
|
||||
|
||||
}
|
||||
//上传多张
|
||||
+(void)uploadImage:(NSString *)url
|
||||
imageNames:(NSArray *)imageNames
|
||||
parms:(NSDictionary *)parms
|
||||
responseBlock:(responseBlock)block
|
||||
{
|
||||
AFHTTPSessionManager*manager=[[AFHTTPSessionManager alloc] init];
|
||||
manager.responseSerializer=[AFHTTPResponseSerializer serializer];
|
||||
NSString *token = [GiGaUserDefault getCurentToken];
|
||||
if (token) {
|
||||
[manager.requestSerializer setValue:token forHTTPHeaderField:@"token"];
|
||||
}
|
||||
|
||||
NSString *fullurl = [NSString stringWithFormat:@"%@%@",[GiGaServerConfig getMainUrl],url];
|
||||
[manager POST:fullurl parameters:parms constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) {
|
||||
|
||||
for (NSUInteger i= 0; i < imageNames.count; i ++) {
|
||||
//上传时使用当前的系统事件作为文件名
|
||||
// NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|
||||
//
|
||||
// formatter.dateFormat = @"yyyyMMddHHmmss";
|
||||
//
|
||||
// NSString *str = [formatter stringFromDate:[NSDate date]];
|
||||
|
||||
NSString *fileName = [NSString stringWithFormat:@"%@.png", imageNames[i]];
|
||||
//服务器上传文件的字段和类型
|
||||
UIImage *image =[GIGaUserFileHelper getUserFeedbackImag:imageNames[i]] ;
|
||||
NSData *imgData = UIImagePNGRepresentation(image);
|
||||
[formData appendPartWithFileData:imgData name:@"file" fileName:fileName mimeType:@"image/png"];
|
||||
|
||||
[formData appendPartWithFormData:imgData name:fileName];
|
||||
}
|
||||
|
||||
} progress:^(NSProgress * _Nonnull uploadProgress) {
|
||||
|
||||
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
|
||||
|
||||
NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingAllowFragments error:nil];
|
||||
NSLog(@"%@", dict);
|
||||
NSDictionary *headerFields = [(NSHTTPURLResponse *)task.response allHeaderFields];
|
||||
if (block) {
|
||||
block(dict, headerFields, nil);
|
||||
}
|
||||
|
||||
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
|
||||
NSDictionary *headerFields = [(NSHTTPURLResponse *)task.response allHeaderFields];
|
||||
if (block) {
|
||||
block(nil, headerFields, error);
|
||||
}
|
||||
}];
|
||||
}
|
||||
@end
|
||||
|
||||
@@ -15,6 +15,13 @@
|
||||
+ (UIImage *) scaleFromImage: (UIImage *) image toSize: (CGSize) size;
|
||||
+ (UIImage *)thumbnailWithImageWithoutScale:(UIImage *)image size:(CGSize)asize;
|
||||
|
||||
+(void)savaShareImange:(NSString *)fileName image:(UIImage *)image;
|
||||
+(UIImage *)zipScaleWithImage:(UIImage *)sourceImage;
|
||||
+(UIImage *)getUserShareImage:(NSString *)imageName;
|
||||
+(void)delectShareImage:(NSString *)imageName;
|
||||
|
||||
+(void)saveUserFeedbackImag:(NSString *)imagename image:(UIImage *)image;
|
||||
+(UIImage *)getUserFeedbackImag:(NSString *)imageName;
|
||||
+(void)delectAllfeedimages;
|
||||
|
||||
@end
|
||||
|
||||
@@ -20,6 +20,33 @@
|
||||
|
||||
}
|
||||
|
||||
+(void)savaShareImange:(NSString *)fileName image:(UIImage *)image{
|
||||
|
||||
NSData*imageData=UIImageJPEGRepresentation(image,1.0f);
|
||||
NSString *fullPath=[[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]stringByAppendingPathComponent:fileName];
|
||||
[imageData writeToFile:fullPath atomically:YES];
|
||||
|
||||
}
|
||||
|
||||
+(void)delectShareImage:(NSString *)imageName{
|
||||
|
||||
//删除文件夹及文件级内的文件:
|
||||
NSString *fullPath=[[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]stringByAppendingPathComponent:imageName];
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];[fileManager removeItemAtPath:fullPath error:nil];
|
||||
|
||||
}
|
||||
|
||||
+(UIImage *)getUserShareImage:(NSString *)imageName{
|
||||
|
||||
|
||||
NSString*fullpath=[[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]stringByAppendingPathComponent:imageName];
|
||||
UIImage*saveImage=[[UIImage alloc]initWithContentsOfFile:fullpath];
|
||||
if (!saveImage) {
|
||||
saveImage = [UIImage imageNamed:@"sharebg_1"];
|
||||
}
|
||||
return saveImage;
|
||||
}
|
||||
|
||||
+ (UIImage *)getUserAvatorWith:(NSString *)userId{
|
||||
|
||||
if (!userId) {
|
||||
@@ -81,4 +108,65 @@
|
||||
return newimage;
|
||||
|
||||
}
|
||||
|
||||
+(UIImage *)zipScaleWithImage:(UIImage *)sourceImage{
|
||||
//进行图像尺寸的压缩
|
||||
CGSize imageSize = sourceImage.size;
|
||||
//取出要压缩的image尺寸
|
||||
CGFloat width = imageSize.width;
|
||||
//图片宽度
|
||||
CGFloat height = imageSize.height;
|
||||
//图片高度 //1.宽高大于1280(宽高比不按照2来算,按照1来算)
|
||||
if (width>1280||height>1280) { if (width>height) { CGFloat scale = height/width; width = 1280; height = width*scale;
|
||||
|
||||
}else{ CGFloat scale = width/height;
|
||||
height = 1280; width = height*scale;
|
||||
|
||||
}
|
||||
//2.宽大于1280高小于1280
|
||||
|
||||
}else if(width>1280||height<1280){
|
||||
CGFloat scale = height/width;
|
||||
width = 1280;
|
||||
height = width*scale;
|
||||
//3.宽小于1280高大于1280
|
||||
|
||||
}else if(width<1280||height>1280){
|
||||
CGFloat scale = width/height; height = 1280; width = height*scale;
|
||||
//4.宽高都小于1280
|
||||
|
||||
}else{
|
||||
|
||||
}
|
||||
//进行尺寸重绘
|
||||
UIGraphicsBeginImageContext(CGSizeMake(width, height));
|
||||
[sourceImage drawInRect:CGRectMake(0,0,width,height)]; UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();
|
||||
return newImage;
|
||||
|
||||
}
|
||||
|
||||
+(void)saveUserFeedbackImag:(NSString *)imagename image:(UIImage *)image
|
||||
{
|
||||
|
||||
|
||||
NSData*imageData=UIImagePNGRepresentation(image);
|
||||
NSString *fullPath=[[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]stringByAppendingPathComponent:[NSString stringWithFormat:@"gigafeed/%@.png",imagename]];
|
||||
NSLog(@"fullPath%@",fullPath);
|
||||
[imageData writeToFile:fullPath atomically:YES];
|
||||
}
|
||||
|
||||
+(UIImage *)getUserFeedbackImag:(NSString *)imageName{
|
||||
NSString*fullpath=[[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]stringByAppendingPathComponent:[NSString stringWithFormat:@"gigafeed/%@.png",imageName]];
|
||||
UIImage*saveImage=[[UIImage alloc]initWithContentsOfFile:fullpath];
|
||||
|
||||
return saveImage;
|
||||
}
|
||||
|
||||
+(void)delectAllfeedimages{
|
||||
|
||||
NSString *fullPath=[[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]stringByAppendingPathComponent:[NSString stringWithFormat:@"gigafeed/"]];
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];[fileManager removeItemAtPath:fullPath error:nil];
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// SJPhotoAlbumsController.h
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/22.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Photos/Photos.h>
|
||||
|
||||
@interface SJPhotoAlbumsController : UIViewController
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,135 @@
|
||||
//
|
||||
// SJPhotoAlbumsController.m
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/22.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SJPhotoAlbumsController.h"
|
||||
#import "SJPhotoPickerMacro.h"
|
||||
|
||||
#import "SJPhotoAlbumCell.h"
|
||||
|
||||
#import "SJPickPhotoController.h"
|
||||
#import "SJPhotoPickerManager.h"
|
||||
#import "SJAlbumModel.h"
|
||||
|
||||
@interface SJPhotoAlbumsController ()<UITableViewDelegate,UITableViewDataSource>
|
||||
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
|
||||
/**
|
||||
* 相册数组
|
||||
*/
|
||||
@property (nonatomic, strong) NSMutableArray *albumArray;
|
||||
|
||||
@end
|
||||
|
||||
static NSString *ID_SJPhotoAlbumCell = @"sJPhotoAlbumCell";
|
||||
|
||||
|
||||
@implementation SJPhotoAlbumsController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
[self setupDatas];
|
||||
[self setupViews];
|
||||
|
||||
|
||||
SJPickPhotoController *vc = [[SJPickPhotoController alloc] init];
|
||||
SJAlbumModel *model = [[SJAlbumModel alloc] init];
|
||||
model = self.albumArray[0];
|
||||
vc.assetResult = model.assetResult;
|
||||
[self.navigationController pushViewController:vc animated:NO];
|
||||
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark 数据初始化
|
||||
- (void)setupDatas {
|
||||
|
||||
[[SJPhotoPickerManager shareSJPhotoPickerManager] requestAlbumsWithType:PHAssetCollectionTypeSmartAlbum albumResult:^(NSArray *albumArray) {
|
||||
self.albumArray = [albumArray mutableCopy];
|
||||
}];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
#pragma mark 视图初始化
|
||||
- (void)setupViews {
|
||||
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"取消" style:(UIBarButtonItemStylePlain) target:self action:@selector(rightBarBtnAction:)];
|
||||
|
||||
// tableView
|
||||
{
|
||||
self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W,SCREEN_H) style:(UITableViewStyleGrouped)];
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
[self.tableView registerClass:[SJPhotoAlbumCell class] forCellReuseIdentifier:ID_SJPhotoAlbumCell];
|
||||
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
self.tableView.backgroundColor = [UIColor whiteColor];
|
||||
[self.view addSubview:self.tableView];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#pragma mark- UITableViewDelegate DataSource
|
||||
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.albumArray.count;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
SJPhotoAlbumCell *cell = [tableView dequeueReusableCellWithIdentifier:ID_SJPhotoAlbumCell forIndexPath:indexPath];
|
||||
if (!cell) {
|
||||
cell = [[SJPhotoAlbumCell alloc] initWithStyle:(UITableViewCellStyleDefault) reuseIdentifier:ID_SJPhotoAlbumCell];
|
||||
}
|
||||
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
|
||||
SJAlbumModel *model = self.albumArray[indexPath.row];
|
||||
|
||||
cell.title = [NSString stringWithFormat:@"%@(%lu)",model.title,model.assetResult.count];
|
||||
[[SJPhotoPickerManager shareSJPhotoPickerManager] requestImageForPHAsset:model.assetResult[0] targetSize:CGSizeMake(55, 55) imageResult:^(UIImage *image) {
|
||||
cell.img = image;
|
||||
}];
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 55;
|
||||
}
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
|
||||
|
||||
return 5.0f;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
|
||||
return 0.01f;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
SJPickPhotoController *vc = [[SJPickPhotoController alloc] init];
|
||||
SJAlbumModel *model = self.albumArray[indexPath.row];
|
||||
vc.assetResult = model.assetResult;
|
||||
vc.title = model.title;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
- (void)rightBarBtnAction:(UIBarButtonItem *)sender {
|
||||
|
||||
[self.navigationController dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// SJPhotoPickerNavController.h
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/22.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface SJPhotoPickerNavController : UINavigationController
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// SJPhotoPickerNavController.m
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/22.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SJPhotoPickerNavController.h"
|
||||
#import "SJPhotoAlbumsController.h"
|
||||
#import "SJPhotoPickerMacro.h"
|
||||
@interface SJPhotoPickerNavController ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation SJPhotoPickerNavController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
[self.navigationBar setBarTintColor:NAVBAR_CLOOUR];
|
||||
[self.navigationBar setTintColor:[UIColor whiteColor]];
|
||||
|
||||
[self.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
|
||||
|
||||
SJPhotoAlbumsController *vc = [[SJPhotoAlbumsController alloc] init];
|
||||
vc.title = @"相册";
|
||||
[self pushViewController:vc animated:NO];
|
||||
|
||||
|
||||
}
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// SJPickPhotoController.h
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/19.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Photos/Photos.h>
|
||||
|
||||
@interface SJPickPhotoController : UIViewController
|
||||
|
||||
@property (nonatomic, strong) PHFetchResult *assetResult;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,240 @@
|
||||
// SJPickPhotoController.m
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/19.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SJPickPhotoController.h"
|
||||
|
||||
#import "SJPhotoPicker.h"
|
||||
#import "SJPhotoPickerMacro.h"
|
||||
|
||||
#import "SJPhotoModel.h"
|
||||
|
||||
#import "SJPickPhotoCell.h"
|
||||
#import "SJPhotoPickerToolBar.h"
|
||||
|
||||
#import "SJPreviewPhotoController.h"
|
||||
|
||||
@interface SJPickPhotoController ()<UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout,SJPreviewPhotoControllerDelegate>
|
||||
|
||||
@property (nonatomic, strong) UICollectionView *collectionView;
|
||||
@property (nonatomic, strong) SJPhotoPickerToolBar *toolBar;
|
||||
|
||||
/**
|
||||
* 所有照片
|
||||
*/
|
||||
@property (nonatomic, strong) NSMutableArray<SJPhotoModel *> *photoArray;
|
||||
/**
|
||||
* 选择的照片
|
||||
*/
|
||||
@property (nonatomic, strong) NSMutableArray<SJPhotoModel *> *pickedArray;
|
||||
|
||||
@end
|
||||
|
||||
static NSString *ID_SJPickPhotoCell = @"sJPickPhotoCell";
|
||||
|
||||
@implementation SJPickPhotoController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
[self setupDatas];
|
||||
[self setupViews];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
}
|
||||
|
||||
#pragma mark 数据初始化
|
||||
- (void)setupDatas {
|
||||
// photoArray
|
||||
{
|
||||
self.photoArray = [NSMutableArray array];
|
||||
|
||||
for (PHAsset *asset in self.assetResult) {
|
||||
|
||||
SJPhotoModel *model = [[SJPhotoModel alloc] init];
|
||||
model.asset = asset;
|
||||
model.inAlbumIndex = self.photoArray.count;
|
||||
model.pickedIndex = 0;
|
||||
model.isPicked = NO;
|
||||
[self.photoArray addObject:model];
|
||||
}
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
// pickedArray
|
||||
{
|
||||
self.pickedArray = [NSMutableArray array];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark 视图初始化
|
||||
- (void)setupViews {
|
||||
|
||||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
|
||||
if (self.title.length == 0) {
|
||||
self.title = @"所有照片";
|
||||
}
|
||||
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"取消" style:(UIBarButtonItemStylePlain) target:self action:@selector(rightBarBtnAction:)];
|
||||
|
||||
// collectionView
|
||||
{
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.minimumLineSpacing = 5.0f;
|
||||
layout.minimumInteritemSpacing = 0.0f;
|
||||
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 5, SCREEN_W, SCREEN_H - 49) collectionViewLayout:layout];
|
||||
self.collectionView.delegate = self;
|
||||
self.collectionView.dataSource = self;
|
||||
[self.collectionView registerClass:[SJPickPhotoCell class] forCellWithReuseIdentifier:ID_SJPickPhotoCell];
|
||||
self.collectionView.backgroundColor = [UIColor whiteColor];
|
||||
self.collectionView.pagingEnabled = NO;
|
||||
[self.view addSubview:self.collectionView];
|
||||
}
|
||||
|
||||
// toolBar
|
||||
{
|
||||
self.toolBar = [[SJPhotoPickerToolBar alloc] init];
|
||||
[self.toolBar.leftBtn addTarget:self action:@selector(previewPhotoAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.toolBar.rightBtn addTarget:self action:@selector(sureBtnAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.view addSubview:self.toolBar];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark- UICollectionViewDelegate DataSource
|
||||
#pragma mark-
|
||||
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.photoArray.count;
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
SJPickPhotoCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ID_SJPickPhotoCell forIndexPath:indexPath];
|
||||
|
||||
cell.backgroundColor = [UIColor yellowColor];
|
||||
|
||||
SJPhotoModel *model = self.photoArray[indexPath.row];
|
||||
[cell setModel:model];
|
||||
|
||||
__weak typeof(cell) weakCell = cell;
|
||||
|
||||
cell.pickBtnBlock = ^(SJPhotoModel *curPickModel) {
|
||||
[self changeCell:weakCell WithModel:curPickModel];
|
||||
};
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return CGSizeMake(Image_W, Image_W);
|
||||
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
SJPreviewPhotoController *vc = [[SJPreviewPhotoController alloc] init];
|
||||
vc.delegate = self;
|
||||
vc.curIndex = indexPath.row;
|
||||
vc.previewArray = [self.photoArray mutableCopy];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark- 点击事件
|
||||
#pragma mark-
|
||||
|
||||
#pragma mark 预览
|
||||
- (void)previewPhotoAction:(UIButton *)sender {
|
||||
|
||||
if (self.pickedArray.count > 0) {
|
||||
|
||||
SJPreviewPhotoController *vc = [[SJPreviewPhotoController alloc] init];
|
||||
vc.delegate = self;
|
||||
vc.curIndex = self.pickedArray.count - 1;
|
||||
vc.previewArray = [self.pickedArray mutableCopy];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark 取消
|
||||
- (void)rightBarBtnAction:(UIBarButtonItem *)sender {
|
||||
|
||||
[self.navigationController dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark 确定
|
||||
- (void)sureBtnAction:(UIButton *)sender {
|
||||
|
||||
NSMutableArray *assetArray = [NSMutableArray array];
|
||||
for (SJPhotoModel *model in self.pickedArray) {
|
||||
PHAsset *asset = model.asset;
|
||||
[assetArray addObject:asset];
|
||||
}
|
||||
if (assetArray.count > MAXCOUNT) {
|
||||
GIGA_ShowToast(@"最多6张");
|
||||
return;
|
||||
}
|
||||
|
||||
SJPhotoPicker *photoPicker = [SJPhotoPicker shareSJPhotoPicker];
|
||||
photoPicker.photoPickerBlock(assetArray);
|
||||
|
||||
[self.navigationController dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
#pragma mark- 其他方法
|
||||
#pragma mark-
|
||||
|
||||
#pragma mark 通过改变改变model值,改变cell状态
|
||||
- (void)pickedArrayChangeWithModel:(SJPhotoModel *)model {
|
||||
|
||||
NSIndexPath *changedIndexP =[NSIndexPath indexPathForItem:model.inAlbumIndex inSection:0];
|
||||
SJPickPhotoCell *changedCell = (SJPickPhotoCell *)[self.collectionView cellForItemAtIndexPath:changedIndexP];
|
||||
[self changeCell:changedCell WithModel:model];
|
||||
}
|
||||
|
||||
|
||||
|
||||
- (void)changeCell:(SJPickPhotoCell *)changedCell WithModel:(SJPhotoModel *)changedModel {
|
||||
|
||||
if (changedModel.isPicked) {
|
||||
|
||||
[changedCell modelChangePickedIndex:self.pickedArray.count + 1];
|
||||
[self.pickedArray addObject:changedModel];
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
[self.pickedArray removeObject:changedModel];
|
||||
|
||||
// 更新剩下选择的图片
|
||||
for (int i = 0; i < self.pickedArray.count; i ++) {
|
||||
|
||||
SJPhotoModel *otherPickedModel = self.pickedArray[i];
|
||||
|
||||
if (otherPickedModel.pickedIndex > changedModel.pickedIndex) {
|
||||
|
||||
otherPickedModel.pickedIndex -= 1;
|
||||
|
||||
NSIndexPath *indexP =[NSIndexPath indexPathForItem:otherPickedModel.inAlbumIndex inSection:0];
|
||||
SJPickPhotoCell *otherCell = (SJPickPhotoCell *)[self.collectionView cellForItemAtIndexPath:indexP];
|
||||
|
||||
[otherCell modelChangePickedIndex:otherPickedModel.pickedIndex];
|
||||
|
||||
}
|
||||
}
|
||||
// 更新 取消选择的图片
|
||||
[changedCell modelChangePickedIndex:0];
|
||||
}
|
||||
|
||||
// 更改工具栏状态信息
|
||||
[self.toolBar changePickedIndex:self.pickedArray.count];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// SJPreviewPhotoController.h
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/19.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "SJPhotoModel.h"
|
||||
|
||||
@protocol SJPreviewPhotoControllerDelegate <NSObject>
|
||||
|
||||
- (void)pickedArrayChangeWithModel:(SJPhotoModel *)model;
|
||||
|
||||
@end
|
||||
|
||||
@interface SJPreviewPhotoController : UIViewController
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *previewArray;
|
||||
@property (nonatomic, assign) NSInteger curIndex;
|
||||
|
||||
@property (nonatomic, strong) id<SJPreviewPhotoControllerDelegate> delegate;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,215 @@
|
||||
//
|
||||
// SJPreviewPhotoController.m
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/19.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SJPreviewPhotoController.h"
|
||||
|
||||
#import <Photos/Photos.h>
|
||||
|
||||
#import "SJPhotoPickerNavBar.h"
|
||||
#import "SJPhotoPickerToolBar.h"
|
||||
#import "SJPreviewPhotoCell.h"
|
||||
|
||||
#import "SJPhotoPicker.h"
|
||||
|
||||
@interface SJPreviewPhotoController ()<UICollectionViewDelegate,UICollectionViewDataSource,SJPhotoPickerNavBarDelegate>
|
||||
|
||||
@property (nonatomic, strong) UICollectionView *collectionView;
|
||||
@property (nonatomic, strong) SJPhotoPickerToolBar *toolBar;
|
||||
@property (nonatomic, strong) SJPhotoPickerNavBar *navBar;
|
||||
|
||||
@property (nonatomic, strong) UIView *backView;
|
||||
@property (nonatomic, strong) NSMutableArray *pickedArray;
|
||||
@property (nonatomic, strong) SJPhotoModel *operatingModel;
|
||||
|
||||
@end
|
||||
|
||||
static NSString *ID_SJPreviewPhotoCell = @"sJPreviewPhotoCell";
|
||||
|
||||
|
||||
@implementation SJPreviewPhotoController
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
[self setupDatas];
|
||||
[self setupViews];
|
||||
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
[self.navigationController setNavigationBarHidden:YES animated:NO];
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
[self.navigationController setNavigationBarHidden:NO animated:NO];
|
||||
}
|
||||
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
}
|
||||
|
||||
#pragma mark 数据初始化
|
||||
- (void)setupDatas {
|
||||
|
||||
self.pickedArray = [NSMutableArray array];
|
||||
|
||||
for (SJPhotoModel *model in self.previewArray) {
|
||||
if (model.isPicked) {
|
||||
[self.pickedArray addObject:model];
|
||||
}
|
||||
}
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
|
||||
#pragma mark 视图初始化
|
||||
- (void)setupViews {
|
||||
|
||||
// collectionView
|
||||
{
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.minimumLineSpacing = 0.0f;
|
||||
layout.minimumInteritemSpacing = 0.0f;
|
||||
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||
|
||||
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, -64, SCREEN_W, SCREEN_H + 64) collectionViewLayout:layout];
|
||||
self.collectionView.pagingEnabled = YES;
|
||||
self.collectionView.showsHorizontalScrollIndicator = NO;
|
||||
self.collectionView.delegate = self;
|
||||
self.collectionView.dataSource = self;
|
||||
[self.collectionView registerClass:[SJPreviewPhotoCell class] forCellWithReuseIdentifier:ID_SJPreviewPhotoCell];
|
||||
self.collectionView.backgroundColor = [UIColor whiteColor];
|
||||
[self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForItem:self.curIndex inSection:0] atScrollPosition:(UICollectionViewScrollPositionNone) animated:NO];
|
||||
self.operatingModel = [self.previewArray lastObject];
|
||||
[self.view addSubview:self.collectionView];
|
||||
}
|
||||
|
||||
// nav
|
||||
{
|
||||
|
||||
self.navBar = [[SJPhotoPickerNavBar alloc] init];
|
||||
self.navBar.delegate = self;
|
||||
self.operatingModel = self.previewArray[self.curIndex];
|
||||
|
||||
if (self.title.length == 0) {
|
||||
self.navBar.leftBtnTitle = @"";
|
||||
}
|
||||
self.navBar.barTitle = [NSString stringWithFormat:@"%lu/%lu",(unsigned long)self.curIndex + 1,(unsigned long)self.previewArray.count];
|
||||
|
||||
if (self.operatingModel.isPicked) {
|
||||
|
||||
[self.navBar setRightBtnTitleIndex:self.operatingModel.pickedIndex];
|
||||
}
|
||||
[self.view addSubview:self.navBar];
|
||||
|
||||
}
|
||||
|
||||
// toolBar
|
||||
{
|
||||
self.toolBar = [[SJPhotoPickerToolBar alloc] init];
|
||||
self.toolBar.backgroundColor = [UIColor colorWithRed:220/255.0 green:220/255.0 blue:220/255.0 alpha:0.3];
|
||||
self.toolBar.rightBtn.backgroundColor = NAVBAR_CLOOUR;
|
||||
[self.toolBar.rightBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
|
||||
|
||||
self.toolBar.leftBtn.hidden = YES;
|
||||
[self.toolBar.rightBtn addTarget:self action:@selector(sureBtnAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.view addSubview:self.toolBar];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark- UICollectionViewDelegate DataSource
|
||||
#pragma mark-
|
||||
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.previewArray.count;
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
SJPreviewPhotoCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ID_SJPreviewPhotoCell forIndexPath:indexPath];
|
||||
cell.zoomScale = 1.0;
|
||||
SJPhotoModel *model = self.previewArray[indexPath.item];
|
||||
cell.asset = model.asset;
|
||||
cell.singleTapEvent = ^(){
|
||||
[self.toolBar changeHideState];
|
||||
[self.navBar changeHideState];
|
||||
};
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return CGSizeMake(SCREEN_W, SCREEN_H);
|
||||
|
||||
}
|
||||
|
||||
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView {
|
||||
|
||||
NSInteger index = (NSInteger)scrollView.contentOffset.x / SCREEN_W;
|
||||
|
||||
self.operatingModel = self.previewArray[index];
|
||||
|
||||
self.navBar.barTitle = [NSString stringWithFormat:@"%lu/%lu",index + 1,(unsigned long)self.previewArray.count];
|
||||
[self.navBar setRightBtnTitleIndex:self.operatingModel.pickedIndex];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark- 点击事件
|
||||
#pragma mark-
|
||||
|
||||
#pragma mark 单选框点击(SJ...NavBarDelegate)
|
||||
- (void)rightBtnAction:(UIButton *)sender {
|
||||
|
||||
self.operatingModel.isPicked = !self.operatingModel.isPicked;
|
||||
|
||||
// 代理传值
|
||||
[self.delegate pickedArrayChangeWithModel:self.operatingModel];
|
||||
|
||||
if (self.operatingModel.isPicked) {
|
||||
|
||||
NSInteger pickedIndex = self.pickedArray.count + 1;
|
||||
self.operatingModel.pickedIndex = pickedIndex;
|
||||
[self.pickedArray addObject:self.operatingModel];
|
||||
[self.navBar setRightBtnTitleIndex:pickedIndex];
|
||||
}
|
||||
else {
|
||||
[self.pickedArray removeObject:self.operatingModel];
|
||||
|
||||
self.operatingModel.pickedIndex = 0;
|
||||
for (int i = 0; i < self.pickedArray.count; i ++) {
|
||||
SJPhotoModel *model = self.pickedArray[i];
|
||||
model.pickedIndex = i + 1;
|
||||
}
|
||||
[self.navBar setRightBtnTitleIndex:0];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark 确定按钮
|
||||
- (void)sureBtnAction:(UIButton *)sender {
|
||||
NSMutableArray *assetArray = [NSMutableArray array];
|
||||
for (SJPhotoModel *model in self.pickedArray) {
|
||||
PHAsset *asset = model.asset;
|
||||
[assetArray addObject:asset];
|
||||
}
|
||||
if (assetArray.count > MAXCOUNT) {
|
||||
GIGA_ShowToast(@"最多6张");
|
||||
return;
|
||||
}
|
||||
SJPhotoPicker *photoPicker = [SJPhotoPicker shareSJPhotoPicker];
|
||||
photoPicker.photoPickerBlock(assetArray);
|
||||
|
||||
[self.navigationController dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,34 @@
|
||||
|
||||
//
|
||||
// SJPhotoPickerMacro.h
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/17.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#ifndef SJPhotoPickerMacro_h
|
||||
#define SJPhotoPickerMacro_h
|
||||
|
||||
|
||||
#define SCREEN_W CGRectGetWidth([UIScreen mainScreen].bounds)
|
||||
#define SCREEN_H CGRectGetHeight([UIScreen mainScreen].bounds)
|
||||
|
||||
#define Image_W (SCREEN_W - 15.0) / 4.0
|
||||
|
||||
#define MAXCOUNT 6
|
||||
#define NAVBAR_CLOOUR [UIColor colorWithRed:131/255.0 green:10/255.0 blue:10/255.0 alpha:1]
|
||||
|
||||
|
||||
/**
|
||||
* Notification
|
||||
*/
|
||||
|
||||
#define PICKEDARRAY_SJNOTIFY_CHANGE @"SJPhotoPickedArrayChangeNotification" // 选择图片图片数组中数据改变
|
||||
|
||||
#import "SJPhotoPickerManager.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* SJPhotoPickerMacro_h */
|
||||
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// SJPhotoPickerManager.h
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/19.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Photos/Photos.h>
|
||||
|
||||
typedef void(^ImageBlcok)(UIImage *image);
|
||||
|
||||
typedef void(^AlbumBlock)(NSArray *albumArray);
|
||||
|
||||
@interface SJPhotoPickerManager : NSObject
|
||||
|
||||
+ (instancetype)shareSJPhotoPickerManager;
|
||||
|
||||
- (void)requestImageForPHAsset:(PHAsset *)asset targetSize:(CGSize)targetSize imageResult:(ImageBlcok)imageBlock;
|
||||
- (void)requestAlbumsWithType:(PHAssetCollectionType)type albumResult:(AlbumBlock)albumBlock;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,84 @@
|
||||
//
|
||||
// SJPhotoPickerManager.m
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/19.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SJPhotoPickerManager.h"
|
||||
|
||||
#import "SJAlbumModel.h"
|
||||
|
||||
@interface SJPhotoPickerManager()
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation SJPhotoPickerManager
|
||||
|
||||
+ (instancetype)shareSJPhotoPickerManager {
|
||||
|
||||
static SJPhotoPickerManager *manager = nil;
|
||||
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
if (!manager) {
|
||||
manager = [[SJPhotoPickerManager alloc] init];
|
||||
}
|
||||
});
|
||||
return manager;
|
||||
}
|
||||
|
||||
- (void)requestImageForPHAsset:(PHAsset *)asset targetSize:(CGSize)targetSize imageResult:(ImageBlcok)imageBlock {
|
||||
|
||||
// 使用PHImageManager从PHAsset中请求图片
|
||||
PHImageManager *imageManager = [[PHImageManager alloc] init];
|
||||
|
||||
|
||||
|
||||
PHImageRequestOptions *options = [[PHImageRequestOptions alloc] init];
|
||||
options.resizeMode = PHImageRequestOptionsResizeModeExact;
|
||||
options.networkAccessAllowed = YES;
|
||||
[imageManager requestImageForAsset:asset targetSize:targetSize contentMode:PHImageContentModeAspectFit options:options resultHandler:^(UIImage * _Nullable result, NSDictionary * _Nullable info) {
|
||||
if (result) {
|
||||
imageBlock(result);
|
||||
}
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
- (void)requestAlbumsWithType:(PHAssetCollectionType)type albumResult:(AlbumBlock)albumBlock {
|
||||
|
||||
// 列出所有相册智能相册
|
||||
PHFetchResult *assetCollectionResult = [PHAssetCollection fetchAssetCollectionsWithType:type subtype:PHAssetCollectionSubtypeAlbumRegular options:nil];
|
||||
|
||||
|
||||
NSMutableArray *albumArray = [NSMutableArray array];
|
||||
// 这时 smartAlbums 中保存的应该是各个智能相册对应的 PHAssetCollection
|
||||
for (NSInteger i = 0; i < assetCollectionResult.count; i++) {
|
||||
|
||||
// 获取一个相册(PHAssetCollection)
|
||||
PHCollection *collection = assetCollectionResult[i];
|
||||
if ([collection class] == [PHAssetCollection class]) {
|
||||
|
||||
PHAssetCollection *assetCollection = (PHAssetCollection *)collection;
|
||||
|
||||
|
||||
PHFetchResult *assetResult = [PHAsset fetchAssetsInAssetCollection:assetCollection options:nil];
|
||||
|
||||
if (assetResult.count != 0) {
|
||||
|
||||
SJAlbumModel *model = [[SJAlbumModel alloc] init];
|
||||
model.title = collection.localizedTitle;
|
||||
model.assetResult = assetResult;
|
||||
|
||||
[albumArray addObject:model];
|
||||
}
|
||||
}
|
||||
albumBlock(albumArray);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// SJAlbumModel.h
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/22.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Photos/Photos.h>
|
||||
|
||||
@interface SJAlbumModel : NSObject
|
||||
|
||||
@property (nonatomic, strong) PHFetchResult *assetResult;
|
||||
@property (nonatomic, strong) NSString *title;
|
||||
|
||||
@end
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// SJAlbumModel.m
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/22.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SJAlbumModel.h"
|
||||
|
||||
@implementation SJAlbumModel
|
||||
|
||||
@end
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// SJPhotoModel.h
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/19.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <Photos/Photos.h>
|
||||
|
||||
@interface SJPhotoModel : NSObject <NSCopying>
|
||||
|
||||
/**
|
||||
* 图片资源
|
||||
*/
|
||||
@property (nonatomic, strong) PHAsset *asset;
|
||||
|
||||
/**
|
||||
* 选中的次序起始值为1 , 0表示没被选中
|
||||
*/
|
||||
@property (nonatomic, assign) NSInteger pickedIndex;
|
||||
|
||||
/**
|
||||
* 在相册中次序起始值为 0
|
||||
*/
|
||||
@property (nonatomic, assign) NSInteger inAlbumIndex;
|
||||
|
||||
/**
|
||||
* 是否选中 YES——选择 NO——取消选择
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL isPicked;
|
||||
|
||||
|
||||
|
||||
@end
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// SJPhotoModel.m
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/19.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SJPhotoModel.h"
|
||||
|
||||
@implementation SJPhotoModel
|
||||
|
||||
-(id)copyWithZone:(NSZone *)zone {
|
||||
|
||||
SJPhotoModel *modelCopy = [[[self class] allocWithZone:zone] init];
|
||||
|
||||
modelCopy.asset = self.asset;
|
||||
modelCopy.pickedIndex = self.pickedIndex;
|
||||
modelCopy.inAlbumIndex = self.inAlbumIndex;
|
||||
|
||||
return modelCopy;
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// SJPhotoPicker.h
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/23.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "SJPhotoPickerManager.h"
|
||||
|
||||
typedef void(^SJPhotoPickerBlock)(NSArray <PHAsset *> *assets);
|
||||
|
||||
@interface SJPhotoPicker : NSObject
|
||||
|
||||
@property (nonatomic, strong) SJPhotoPickerBlock photoPickerBlock;
|
||||
|
||||
+ (instancetype)shareSJPhotoPicker;
|
||||
|
||||
- (void) showPhotoPickerToController:(UIViewController *)controller pickedAssets:(SJPhotoPickerBlock)photoPickerBlcok;
|
||||
|
||||
@end
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
//
|
||||
// SJPhotoPicker.m
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/23.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SJPhotoPicker.h"
|
||||
#import "SJPhotoPickerNavController.h"
|
||||
|
||||
@implementation SJPhotoPicker
|
||||
|
||||
+ (instancetype)shareSJPhotoPicker {
|
||||
|
||||
static SJPhotoPicker *photoPicker = nil;
|
||||
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
if (!photoPicker) {
|
||||
photoPicker = [[SJPhotoPicker alloc] init];
|
||||
}
|
||||
});
|
||||
return photoPicker;
|
||||
}
|
||||
|
||||
- (void) showPhotoPickerToController:(UIViewController *)controller pickedAssets:(SJPhotoPickerBlock)photoPickerBlcok {
|
||||
|
||||
|
||||
|
||||
[PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status){
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
switch (status) {
|
||||
|
||||
case PHAuthorizationStatusNotDetermined:
|
||||
{
|
||||
NSLog(@"用户还没有做出选择");
|
||||
break;
|
||||
}
|
||||
case PHAuthorizationStatusAuthorized:
|
||||
{
|
||||
|
||||
NSLog(@"用户允许当前应用访问相册");
|
||||
SJPhotoPickerNavController *vc = [[SJPhotoPickerNavController alloc] init];
|
||||
[controller presentViewController:vc animated:YES completion:nil];
|
||||
self.photoPickerBlock = photoPickerBlcok;
|
||||
|
||||
break;
|
||||
}
|
||||
case PHAuthorizationStatusDenied:
|
||||
{
|
||||
NSLog(@"用户拒绝当前应用访问相册,我们需要提醒用户打开访问开关");
|
||||
break;
|
||||
}
|
||||
case PHAuthorizationStatusRestricted:
|
||||
{
|
||||
NSLog(@"家长控制,不允许访问");
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
NSLog(@"default");
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// SJPhotoAlbumCell.h
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/22.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface SJPhotoAlbumCell : UITableViewCell
|
||||
|
||||
@property (nonatomic, strong) NSString *title;
|
||||
@property (nonatomic, strong) UIImage *img;
|
||||
|
||||
@end
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
//
|
||||
// SJPhotoAlbumCell.m
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/22.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SJPhotoAlbumCell.h"
|
||||
#import "SJPhotoPickerMacro.h"
|
||||
|
||||
@interface SJPhotoAlbumCell()
|
||||
|
||||
@property (nonatomic, strong) UIImageView *imgView;
|
||||
@property (nonatomic, strong) UILabel *titleLab;
|
||||
@property (nonatomic, strong) UILabel *underLine;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation SJPhotoAlbumCell
|
||||
|
||||
- (instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
||||
if (self) {
|
||||
[self s_setupCellView];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)s_setupCellView {
|
||||
|
||||
CGFloat X_Padding = 15.0;
|
||||
self.imgView = [[UIImageView alloc] initWithFrame:CGRectMake(X_Padding, 0, 55, 54)];
|
||||
self.imgView.backgroundColor= [UIColor blueColor];
|
||||
[self.contentView addSubview:self.imgView];
|
||||
|
||||
self.titleLab = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.imgView.frame) + 15 , 0,SCREEN_W - CGRectGetWidth(self.imgView.frame) - 15 * 2 - 30, 54)];
|
||||
[self.contentView addSubview:self.titleLab];
|
||||
|
||||
|
||||
self.underLine = [[UILabel alloc] initWithFrame:CGRectMake(CGRectGetMaxX(self.imgView.frame) + 15 , CGRectGetMaxY(self.titleLab.frame),SCREEN_W - CGRectGetWidth(self.imgView.frame) - 15 * 2, 1)];
|
||||
self.underLine.backgroundColor = [UIColor colorWithRed:236/255.0 green:236/255.0 blue:236/255.0 alpha:1];
|
||||
[self.contentView addSubview:self.underLine];
|
||||
|
||||
}
|
||||
|
||||
- (NSString *)title {
|
||||
return self.title;
|
||||
}
|
||||
|
||||
- (void)setTitle:(NSString *)title {
|
||||
self.titleLab.attributedText = [self attributedString:title];
|
||||
}
|
||||
|
||||
- (UIImage *)img {
|
||||
return self.img;
|
||||
}
|
||||
|
||||
- (void)setImg:(UIImage *)img {
|
||||
self.imgView.image = img;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 更改字符串的前两个空格之间字符串的颜色
|
||||
*
|
||||
* @param txt 要改变颜色的字符床
|
||||
*
|
||||
* @return 改变后的字符串
|
||||
*/
|
||||
- (NSMutableAttributedString *)attributedString:(NSString *)txt {
|
||||
|
||||
// 查找出前两个空格的位置
|
||||
NSInteger start = 0;
|
||||
NSInteger end = 0;
|
||||
NSRange countRange = NSMakeRange(0, 0);
|
||||
|
||||
NSString *leftString = @"(";
|
||||
int leftAsciiCode = [leftString characterAtIndex:0]; // 65
|
||||
|
||||
NSString *rightString = @")";
|
||||
int rightAsciiCode = [rightString characterAtIndex:0]; // 65
|
||||
|
||||
for (int i = 0 ; i < txt.length; i ++) {
|
||||
if ([txt characterAtIndex:i] == leftAsciiCode) {
|
||||
start = i;
|
||||
}
|
||||
|
||||
if([txt characterAtIndex:i] == rightAsciiCode){
|
||||
end = i;
|
||||
}
|
||||
countRange = NSMakeRange(start, end - start + 1);
|
||||
}
|
||||
// 改变范围内字符颜色
|
||||
NSMutableAttributedString *attributeStr = [[NSMutableAttributedString alloc] initWithString:txt];
|
||||
[attributeStr addAttribute:NSForegroundColorAttributeName value:[UIColor lightGrayColor] range:countRange];
|
||||
return attributeStr;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// SJPhotoPickerNavBar.h
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/22.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@protocol SJPhotoPickerNavBarDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
- (void)leftBtnAction:(UIButton *)sender;
|
||||
- (void)rightBtnAction:(UIButton *)sender;
|
||||
|
||||
@end
|
||||
|
||||
@interface SJPhotoPickerNavBar : UIView
|
||||
|
||||
@property (nonatomic, strong) id delegate;
|
||||
|
||||
@property (nonatomic, assign) NSInteger rightBtnTitleIndex;
|
||||
@property (nonatomic, strong) NSString *barTitle;
|
||||
@property (nonatomic, strong) NSString *leftBtnTitle;
|
||||
|
||||
- (void)changeHideState;
|
||||
|
||||
@end
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
//
|
||||
// SJPhotoPickerNavBar.m
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/22.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SJPhotoPickerNavBar.h"
|
||||
|
||||
#import "SJPhotoPickerMacro.h"
|
||||
|
||||
#import "SJPhotoPickerRaidoButton.h"
|
||||
|
||||
@interface SJPhotoPickerNavBar()
|
||||
|
||||
@property (nonatomic, strong) UIButton *leftBtn;
|
||||
@property (nonatomic, strong) UILabel *titleLab;
|
||||
@property (nonatomic, strong) SJPhotoPickerRaidoButton *rightBtn;
|
||||
|
||||
@property (nonatomic, assign) BOOL barHide;
|
||||
|
||||
@end
|
||||
|
||||
@implementation SJPhotoPickerNavBar
|
||||
|
||||
- (instancetype)init {
|
||||
self = [super initWithFrame:CGRectMake(0, 0, SCREEN_W, 64)];
|
||||
if (self) {
|
||||
[self setupViews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setupViews {
|
||||
|
||||
self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.6];
|
||||
self.barHide = NO;
|
||||
|
||||
// leftBtn
|
||||
{
|
||||
self.leftBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
|
||||
self.leftBtn.frame = CGRectMake(0, 20, 70, 44);
|
||||
[self.leftBtn setTitleColor:[UIColor colorWithWhite:0.5 alpha:0.5] forState:(UIControlStateHighlighted)];
|
||||
|
||||
[self.leftBtn setImageEdgeInsets:UIEdgeInsetsMake(0, -5, 0, 0)];
|
||||
[self.leftBtn setImage:[UIImage imageNamed:@"photopicker_back"] forState:(UIControlStateNormal)];
|
||||
|
||||
[self.leftBtn addTarget:self action:@selector(leftBtnAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self addSubview:self.leftBtn];
|
||||
|
||||
}
|
||||
|
||||
// titleLab
|
||||
{
|
||||
self.titleLab = [[UILabel alloc] init];
|
||||
self.titleLab.font = [UIFont systemFontOfSize:16];
|
||||
self.titleLab.textColor = [UIColor whiteColor];
|
||||
self.titleLab.textAlignment = NSTextAlignmentCenter;
|
||||
[self addSubview:self.titleLab];
|
||||
}
|
||||
|
||||
// rightBtn
|
||||
{
|
||||
self.rightBtn = [[SJPhotoPickerRaidoButton alloc] initWithFrame:CGRectMake(SCREEN_W - 35, 31, 20, 20)];
|
||||
[self.rightBtn addTarget:self action:@selector(rightBtnAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self addSubview:self.rightBtn];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setRightBtnTitleIndex:(NSInteger)rightBtnTitleIndex {
|
||||
_rightBtnTitleIndex = rightBtnTitleIndex;
|
||||
[self.rightBtn setPickedIndex:rightBtnTitleIndex];
|
||||
|
||||
}
|
||||
|
||||
- (void)setLeftBtnTitle:(NSString *)leftBtnTitle {
|
||||
|
||||
_leftBtnTitle = leftBtnTitle;
|
||||
|
||||
CGFloat titleWidth = [self widthWithString:leftBtnTitle textFontSize:16];
|
||||
|
||||
self.leftBtn.frame = CGRectMake(10, 20, titleWidth + 20, 44);
|
||||
[self.leftBtn setTitle:leftBtnTitle forState:(UIControlStateNormal)];
|
||||
}
|
||||
|
||||
- (void)setBarTitle:(NSString *)barTitle {
|
||||
|
||||
_barTitle = barTitle;
|
||||
|
||||
CGFloat titleWidth = [self widthWithString:barTitle textFontSize:16];
|
||||
self.titleLab.frame = CGRectMake((SCREEN_W - titleWidth) * 0.5, 20, titleWidth, 44);
|
||||
self.titleLab.text = barTitle;
|
||||
}
|
||||
|
||||
- (void)leftBtnAction:(UIButton *)sender {
|
||||
|
||||
UIViewController *vc = [self getCurrentViewController];
|
||||
if (vc.navigationController) {
|
||||
[vc.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)rightBtnAction:(UIButton *)sender {
|
||||
[self.delegate rightBtnAction:sender];
|
||||
}
|
||||
|
||||
- (void)changeHideState {
|
||||
|
||||
self.barHide = !self.barHide;
|
||||
|
||||
if (self.barHide) {
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.frame = CGRectMake(0, -64, SCREEN_W, 64);
|
||||
}];
|
||||
}
|
||||
else {
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.frame = CGRectMake(0, 0, SCREEN_W, 64);
|
||||
}];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/** 获取当前View的控制器对象 */
|
||||
-(UIViewController *)getCurrentViewController{
|
||||
UIResponder *next = [self nextResponder];
|
||||
do {
|
||||
if ([next isKindOfClass:[UIViewController class]]) {
|
||||
return (UIViewController *)next;
|
||||
}
|
||||
next = [next nextResponder];
|
||||
} while (next != nil);
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
- (CGFloat)widthWithString:(NSString *)text textFontSize:(CGFloat)size {
|
||||
CGRect rect = [text boundingRectWithSize:CGSizeMake(LONG_MAX, 8)options:(NSStringDrawingUsesLineFragmentOrigin) attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16]} context:nil];
|
||||
return rect.size.width;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// SJPhotoPickerRaidoButton.h
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/22.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
typedef void(^RadioButtonTouchedBlock)();
|
||||
|
||||
@interface SJPhotoPickerRaidoButton : UIButton
|
||||
|
||||
@property (nonatomic, assign) NSInteger pickedIndex;
|
||||
|
||||
@property (nonatomic, strong) RadioButtonTouchedBlock touchedBlock;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// SJPhotoPickerRaidoButton.m
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/22.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SJPhotoPickerRaidoButton.h"
|
||||
#import "SJPhotoPickerMacro.h"
|
||||
|
||||
@implementation SJPhotoPickerRaidoButton
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self s_setupViews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)s_setupViews {
|
||||
|
||||
self.titleLabel.font = [UIFont systemFontOfSize:13];
|
||||
self.layer.cornerRadius = CGRectGetWidth(self.frame) * 0.5;
|
||||
self.layer.masksToBounds = YES;
|
||||
self.layer.borderWidth = 1;
|
||||
self.layer.borderColor = [UIColor whiteColor].CGColor;
|
||||
|
||||
}
|
||||
|
||||
- (void)setPickedIndex:(NSInteger)pickedIndex{
|
||||
|
||||
if (pickedIndex != 0) {
|
||||
self.backgroundColor = NAVBAR_CLOOUR;
|
||||
[self setTitle:[NSString stringWithFormat:@"%ld",pickedIndex] forState:(UIControlStateNormal)];
|
||||
}
|
||||
else {
|
||||
self.backgroundColor = [UIColor colorWithRed:148/255.0 green:148/255.0 blue:148/255.0 alpha:0.6];
|
||||
[self setTitle:@"" forState:(UIControlStateNormal)];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// SJPhotoPickerToolBar.h
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/22.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "SJPhotoPickerMacro.h"
|
||||
|
||||
@interface SJPhotoPickerToolBar : UIView
|
||||
|
||||
@property (nonatomic, strong) UIButton *leftBtn;
|
||||
@property (nonatomic, strong) UIButton *rightBtn;
|
||||
|
||||
|
||||
- (void)changePickedIndex:(NSInteger) pickedIndex;
|
||||
- (void)changeHideState;
|
||||
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,99 @@
|
||||
//
|
||||
// SJPhotoPickerToolBar.m
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/22.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SJPhotoPickerToolBar.h"
|
||||
#import "SJPhotoPickerMacro.h"
|
||||
|
||||
@interface SJPhotoPickerToolBar()
|
||||
|
||||
@property (nonatomic, assign) BOOL barHide;
|
||||
|
||||
@end;
|
||||
|
||||
@implementation SJPhotoPickerToolBar
|
||||
|
||||
- (instancetype)init {
|
||||
|
||||
self = [super init];
|
||||
|
||||
if (self) {
|
||||
self.frame = CGRectMake(0, SCREEN_H - 44, SCREEN_W, 44);
|
||||
[self s_setupViews];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)s_setupViews {
|
||||
|
||||
self.layer.shadowOffset = CGSizeMake(0, -0.3);
|
||||
self.layer.shadowColor= [UIColor lightGrayColor].CGColor;
|
||||
self.layer.shadowRadius = 1;
|
||||
self.layer.shadowOpacity = 1;
|
||||
|
||||
self.backgroundColor = [UIColor colorWithRed:245/255.0 green:245/255.0 blue:245/255.0 alpha:0.9];
|
||||
|
||||
self.leftBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
|
||||
self.leftBtn.frame = CGRectMake(5, 7, 60, 30);
|
||||
[self.leftBtn setTitleColor:NAVBAR_CLOOUR forState:(UIControlStateNormal)];
|
||||
self.leftBtn.titleLabel.font = [UIFont systemFontOfSize:16];
|
||||
[self.leftBtn setTitle:@"预览" forState:(UIControlStateNormal)];
|
||||
[self addSubview:self.leftBtn];
|
||||
|
||||
self.rightBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
|
||||
self.rightBtn.frame = CGRectMake(SCREEN_W - 75, 7, 65, 30);
|
||||
self.rightBtn.backgroundColor = NAVBAR_CLOOUR;
|
||||
[self.rightBtn setTitleColor:[UIColor colorWithRed:195/255.0 green:195/255.0 blue:195/255.0 alpha:1] forState:(UIControlStateNormal)];
|
||||
self.rightBtn.layer.cornerRadius = 2;
|
||||
self.rightBtn.layer.masksToBounds = YES;
|
||||
self.rightBtn.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
[self.rightBtn setTitle:@"确定" forState:(UIControlStateNormal)];
|
||||
[self addSubview:self.rightBtn];
|
||||
|
||||
self.barHide = NO;
|
||||
|
||||
}
|
||||
|
||||
- (void)changePickedIndex:(NSInteger) pickedIndex {
|
||||
if (pickedIndex == 0) {
|
||||
|
||||
[self.leftBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
|
||||
self.rightBtn.backgroundColor = NAVBAR_CLOOUR;
|
||||
self.leftBtn.backgroundColor = NAVBAR_CLOOUR;
|
||||
[self.rightBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
|
||||
[self.rightBtn setTitle:@"确定" forState:(UIControlStateNormal)];
|
||||
}
|
||||
else {
|
||||
|
||||
self.rightBtn.backgroundColor = NAVBAR_CLOOUR;
|
||||
self.leftBtn.backgroundColor = NAVBAR_CLOOUR;
|
||||
[self.rightBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
|
||||
[self.rightBtn setTitle:[NSString stringWithFormat:@"确定(%lu)",(unsigned long)pickedIndex] forState:(UIControlStateNormal)];
|
||||
[self.leftBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)changeHideState {
|
||||
|
||||
self.barHide = !self.barHide;
|
||||
|
||||
if (self.barHide) {
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.frame = CGRectMake(0, SCREEN_H, SCREEN_W, 44);
|
||||
}];
|
||||
}
|
||||
else {
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.frame = CGRectMake(0, SCREEN_H - 44, SCREEN_W, 44);
|
||||
}];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// SJPickPhotoCell.h
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/19.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Photos/Photos.h>
|
||||
|
||||
#import "SJPhotoPickerMacro.h"
|
||||
|
||||
#import "SJPhotoModel.h"
|
||||
|
||||
typedef void(^PickBtnBlock)(SJPhotoModel *curPickModel);
|
||||
typedef void(^ModelChangeBlock)(SJPhotoModel *modifiedModel);
|
||||
|
||||
@interface SJPickPhotoCell : UICollectionViewCell
|
||||
|
||||
@property (nonatomic, strong) SJPhotoModel *model;
|
||||
|
||||
@property (nonatomic, strong) PickBtnBlock pickBtnBlock;
|
||||
|
||||
- (void)modelChangePickedIndex:(NSInteger)pickedIndex;
|
||||
|
||||
@end
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
//
|
||||
// SJPickPhotoCell.m
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/19.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SJPickPhotoCell.h"
|
||||
|
||||
#import "SJPhotoPickerManager.h"
|
||||
#import "SJPhotoPickerMacro.h"
|
||||
|
||||
@interface SJPickPhotoCell()
|
||||
|
||||
@property (nonatomic, strong) UIImageView *imgView;
|
||||
@property (nonatomic, strong) UIButton *pickBtn;
|
||||
|
||||
@end
|
||||
|
||||
@implementation SJPickPhotoCell
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self setupViews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setupViews {
|
||||
|
||||
// imgView
|
||||
{
|
||||
self.imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0,Image_W, Image_W)];
|
||||
self.imgView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
self.imgView.backgroundColor = NAVBAR_CLOOUR;
|
||||
[self.contentView addSubview:self.imgView];
|
||||
}
|
||||
|
||||
// pickBtn
|
||||
{
|
||||
self.pickBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
|
||||
self.pickBtn.frame = CGRectMake(CGRectGetMaxX(self.imgView.frame) - CGRectGetWidth(self.imgView.frame) * 0.35,CGRectGetWidth(self.imgView.frame) * 0.05, CGRectGetWidth(self.imgView.frame) * 0.3, CGRectGetWidth(self.imgView.frame) * 0.3);
|
||||
|
||||
self.pickBtn.layer.cornerRadius = CGRectGetWidth(self.pickBtn.frame) * 0.5;
|
||||
self.pickBtn.layer.masksToBounds = YES;
|
||||
self.pickBtn.layer.borderWidth = 1;
|
||||
self.pickBtn.layer.borderColor = [UIColor whiteColor].CGColor;
|
||||
|
||||
self.pickBtn.titleLabel.font = [UIFont systemFontOfSize:13];
|
||||
self.pickBtn.backgroundColor = NAVBAR_CLOOUR;
|
||||
|
||||
[self.pickBtn addTarget:self action:@selector(pickBtnAction:) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
|
||||
[self.contentView addSubview:self.pickBtn];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setModel:(SJPhotoModel *)model {
|
||||
|
||||
_model = model;
|
||||
|
||||
[[SJPhotoPickerManager shareSJPhotoPickerManager] requestImageForPHAsset:model.asset targetSize:CGSizeMake(Image_W, Image_W) imageResult:^(UIImage *image) {
|
||||
if (image) {
|
||||
self.imgView.image = image;
|
||||
}
|
||||
}];
|
||||
|
||||
if (model.pickedIndex != 0) {
|
||||
|
||||
[self.pickBtn setTitle:[NSString stringWithFormat:@"%ld",(long)model.pickedIndex] forState:(UIControlStateNormal)];
|
||||
self.pickBtn.backgroundColor = NAVBAR_CLOOUR;
|
||||
}
|
||||
else {
|
||||
|
||||
[self.pickBtn setTitle:@"" forState:(UIControlStateNormal)];
|
||||
self.pickBtn.backgroundColor = [UIColor colorWithRed:148/255.0 green:148/255.0 blue:148/255.0 alpha:0.6];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (void)modelChangePickedIndex:(NSInteger)pickedIndex{
|
||||
|
||||
if (pickedIndex != 0) {
|
||||
self.model.pickedIndex = pickedIndex;
|
||||
self.model.isPicked = YES;
|
||||
[self.pickBtn setTitle:[NSString stringWithFormat:@"%ld",(long)pickedIndex] forState:(UIControlStateNormal)];
|
||||
self.pickBtn.backgroundColor = NAVBAR_CLOOUR;
|
||||
[self showOscillatoryAnimationWithLayer:self.pickBtn.layer];
|
||||
}
|
||||
else {
|
||||
self.model.pickedIndex = 0;
|
||||
self.model.isPicked = NO;
|
||||
[self.pickBtn setTitle:@"" forState:(UIControlStateNormal)];
|
||||
self.pickBtn.backgroundColor = [UIColor colorWithRed:148/255.0 green:148/255.0 blue:148/255.0 alpha:0.6];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)showOscillatoryAnimationWithLayer:(CALayer *)layer {
|
||||
|
||||
NSNumber *animationScale1 = @(1.15);
|
||||
NSNumber *animationScale2 = @(0.85);
|
||||
NSNumber *animationScale3 = @(1.0);
|
||||
|
||||
[UIView animateWithDuration:0.15 delay:0 options:UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut animations:^{
|
||||
[layer setValue:animationScale1 forKeyPath:@"transform.scale"];
|
||||
} completion:^(BOOL finished) {
|
||||
[UIView animateWithDuration:0.15 delay:0 options:UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut animations:^{
|
||||
[layer setValue:animationScale2 forKeyPath:@"transform.scale"];
|
||||
} completion:^(BOOL finished) {
|
||||
[UIView animateWithDuration:0.1 delay:0 options:UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseInOut animations:^{
|
||||
[layer setValue:animationScale3 forKeyPath:@"transform.scale"];
|
||||
} completion:nil];
|
||||
}];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)pickBtnAction:(UIButton *)sender {
|
||||
|
||||
self.model.isPicked = !self.model.isPicked;
|
||||
self.pickBtnBlock(self.model);
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// SJPreviewPhotoCell.h
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/19.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Photos/Photos.h>
|
||||
|
||||
typedef void(^SingleTapEventBlock)(void);
|
||||
|
||||
@interface SJPreviewPhotoCell : UICollectionViewCell
|
||||
|
||||
@property (nonatomic, strong) PHAsset *asset;
|
||||
@property (nonatomic, assign) CGFloat zoomScale;
|
||||
|
||||
@property (nonatomic, strong) SingleTapEventBlock singleTapEvent;
|
||||
|
||||
@end
|
||||
+127
@@ -0,0 +1,127 @@
|
||||
//
|
||||
// SJPreviewPhotoCell.m
|
||||
// SJPhotoPickerDemo
|
||||
//
|
||||
// Created by Jaesun on 16/8/19.
|
||||
// Copyright © 2016年 S.J. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SJPreviewPhotoCell.h"
|
||||
|
||||
#import "SJPhotoPickerMacro.h"
|
||||
|
||||
@interface SJPreviewPhotoCell() <UIScrollViewDelegate>
|
||||
|
||||
@property (nonatomic, strong) UIImageView *imgView;
|
||||
|
||||
@property (nonatomic, strong) UIScrollView *scrollView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation SJPreviewPhotoCell
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self setupViews];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)setupViews {
|
||||
|
||||
self.scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H)];
|
||||
self.scrollView.delegate = self;
|
||||
self.scrollView.maximumZoomScale = 4.0;
|
||||
self.scrollView.minimumZoomScale = 1.0;
|
||||
|
||||
self.scrollView.contentSize = CGSizeMake(SCREEN_W, SCREEN_H);
|
||||
[self.contentView addSubview:self.scrollView];
|
||||
self.imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H)];
|
||||
self.imgView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[self.scrollView addSubview:self.imgView];
|
||||
|
||||
UITapGestureRecognizer *singleTapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTapGestureAction:)];
|
||||
[self.scrollView addGestureRecognizer:singleTapGesture];
|
||||
|
||||
UITapGestureRecognizer *doubleTapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(doubleTapGestureAction:)];
|
||||
[doubleTapGesture setNumberOfTapsRequired:2]; // Default is 1
|
||||
[self.scrollView addGestureRecognizer:doubleTapGesture];
|
||||
|
||||
// 如果满足双击条件,单击事件触发失败,防止双击时单击事件同时被触发
|
||||
[singleTapGesture requireGestureRecognizerToFail:doubleTapGesture];
|
||||
}
|
||||
|
||||
- (void)setAsset:(PHAsset *)asset {
|
||||
|
||||
_asset = asset;
|
||||
|
||||
[[SJPhotoPickerManager shareSJPhotoPickerManager] requestImageForPHAsset:asset targetSize:PHImageManagerMaximumSize imageResult:^(UIImage *image) {
|
||||
if (image) {
|
||||
self.imgView.image = image;
|
||||
CGFloat scale_H = SCREEN_H / image.size.height;
|
||||
CGFloat scale_W = SCREEN_W / image.size.width;
|
||||
|
||||
CGSize size;
|
||||
if (scale_H > scale_W) {
|
||||
size = CGSizeMake(SCREEN_W, scale_W * image.size.height);
|
||||
}
|
||||
else if (scale_H < scale_W) {
|
||||
size = CGSizeMake(scale_H * image.size.width, SCREEN_H);
|
||||
}
|
||||
self.imgView.frame = CGRectMake(0, 0, size.width, size.height);
|
||||
self.imgView.center = self.scrollView.center;
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setZoomScale:(CGFloat)zoomScale {
|
||||
_zoomScale = zoomScale;
|
||||
[UIView animateWithDuration:0.3 animations:^{
|
||||
self.scrollView.zoomScale = zoomScale;
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
- (void)scrollViewDidZoom:(UIScrollView *)scrollView {
|
||||
|
||||
CGSize viewSize = self.imgView.frame.size;
|
||||
CGPoint centerPoint;
|
||||
|
||||
if (viewSize.width<=CGRectGetWidth(self.bounds) && viewSize.height<=CGRectGetHeight(self.bounds)) {
|
||||
centerPoint = CGPointMake(CGRectGetWidth(self.bounds)*0.5f, CGRectGetHeight(self.bounds)*0.5f);
|
||||
|
||||
}else if (viewSize.width>=CGRectGetWidth(self.bounds) && viewSize.height>=CGRectGetHeight(self.bounds) ){
|
||||
centerPoint = CGPointMake(scrollView.contentSize.width*0.5f, scrollView.contentSize.height*0.5f);
|
||||
|
||||
}else if (viewSize.width<=CGRectGetWidth(self.bounds) && viewSize.height>=CGRectGetHeight(self.bounds) ){
|
||||
centerPoint = CGPointMake(CGRectGetWidth(self.bounds)*0.5f, scrollView.contentSize.height*0.5f);
|
||||
|
||||
}else if ((viewSize.width >= CGRectGetWidth(self.bounds)) && (viewSize.height <= CGRectGetHeight(self.bounds))){
|
||||
centerPoint = CGPointMake(scrollView.contentSize.width*0.5f, CGRectGetHeight(self.bounds)*0.5f);
|
||||
}
|
||||
self.imgView.center = centerPoint;
|
||||
}
|
||||
|
||||
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView {
|
||||
return self.imgView;
|
||||
}
|
||||
|
||||
- (void)singleTapGestureAction:(UITapGestureRecognizer *)sender {
|
||||
|
||||
self.singleTapEvent();
|
||||
|
||||
}
|
||||
|
||||
- (void)doubleTapGestureAction:(UITapGestureRecognizer *)sender {
|
||||
if (self.zoomScale == 4) {
|
||||
self.zoomScale = 1;
|
||||
}else {
|
||||
CGFloat newScale = self.zoomScale * 2.0f;
|
||||
self.zoomScale = newScale;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
+2
-1
@@ -114,6 +114,7 @@ alpha:((float)(rgbValue & 0xFF))/255.0]
|
||||
//HUD
|
||||
#define HUD_DISPLAY_DURATION 2
|
||||
#define HUD_TIMEOUT_DURATION 8
|
||||
|
||||
//分享图片文件名
|
||||
#define kUSERSHAREA_IMAGENAME @"mask_share"
|
||||
|
||||
#endif /* GIGA_h */
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#import <UMAnalytics/MobClick.h>
|
||||
|
||||
#endif
|
||||
#import "GiGaUserDefault.h"
|
||||
|
||||
#import "GIGA.h"
|
||||
//#import "AFNetworking.h"
|
||||
|
||||
@@ -11,8 +11,10 @@
|
||||
#import "MaskTimeTimeViewCell.h"
|
||||
#import "MaskTimeEndActionViewCell.h"
|
||||
#import "ShareViewController.h"
|
||||
|
||||
@interface GIGaMaskShareViewController ()
|
||||
#import "MaskTimeShareActionSheet.h"
|
||||
#import "GIGaUserFileHelper.h"
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
@interface GIGaMaskShareViewController ()<UIImagePickerControllerDelegate,UINavigationControllerDelegate>
|
||||
|
||||
@end
|
||||
|
||||
@@ -99,7 +101,36 @@
|
||||
|
||||
#pragma mark changeBackBtnAction
|
||||
-(void)changeBackBtnAction{
|
||||
MaskTimeShareActionSheet * sheet = [[MaskTimeShareActionSheet alloc] initWithFrame:CGRectMake(0, 0, KMainW, KMainH)];
|
||||
[sheet show:^(NSUInteger index) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
{//手机
|
||||
[self photosAlbum];
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
//系统
|
||||
[GIGaUserFileHelper delectShareImage:kUSERSHAREA_IMAGENAME];
|
||||
ShareViewController *share = [[ShareViewController alloc] init];
|
||||
[self presentViewController:share animated:NO completion:nil];
|
||||
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
//自拍
|
||||
[self takePhoto];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}];
|
||||
|
||||
[self.view addSubview:sheet];
|
||||
}
|
||||
|
||||
#pragma mark share
|
||||
@@ -110,4 +141,91 @@
|
||||
|
||||
}
|
||||
|
||||
#pragma mark 相册
|
||||
-(void)photosAlbum{
|
||||
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init]; imagePickerController.delegate = self; imagePickerController.allowsEditing = YES;
|
||||
|
||||
//相册
|
||||
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
|
||||
//权限
|
||||
|
||||
imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
|
||||
[self presentViewController:imagePickerController animated:YES completion:nil];
|
||||
|
||||
}else{
|
||||
|
||||
NSString *errorStr = @"应用相权册限受限,请在设置中启用";
|
||||
[self jxt_showAlertWithTitle:@"" message:errorStr appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
alertMaker.addActionCancelTitle(@"取消");
|
||||
alertMaker.addActionDefaultTitle(@"去开启");
|
||||
|
||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||
if (buttonIndex == 1) {
|
||||
NSURL *url = [NSURL URLWithString:@"prefs:root=Photos"];
|
||||
if ([[UIApplication sharedApplication] canOpenURL:url]) {
|
||||
[[UIApplication sharedApplication] openURL:url];
|
||||
}
|
||||
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(void)takePhoto{
|
||||
|
||||
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init]; imagePickerController.delegate = self; imagePickerController.allowsEditing = YES;
|
||||
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
|
||||
|
||||
//权限判断应用是否有使用相机的权限
|
||||
NSString *mediaType = AVMediaTypeVideo;//读取媒体类型
|
||||
AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:mediaType];//读取设备授权状态
|
||||
if(authStatus == AVAuthorizationStatusRestricted || authStatus == AVAuthorizationStatusDenied){
|
||||
NSString *errorStr = @"应用相机权限受限,请在设置中启用";
|
||||
[self jxt_showAlertWithTitle:@"" message:errorStr appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
alertMaker.addActionCancelTitle(@"取消");
|
||||
alertMaker.addActionDefaultTitle(@"去开启");
|
||||
|
||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||
|
||||
if (buttonIndex == 1) {
|
||||
|
||||
NSString *urlStr = @"App-Prefs:root=Photos";
|
||||
if (@available(iOS 10.0, *)) {
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr] options:@{} completionHandler:nil];
|
||||
} else {
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr]];
|
||||
// Fallback on earlier versions
|
||||
}
|
||||
}
|
||||
}];
|
||||
return;
|
||||
}
|
||||
|
||||
// 设置数据源
|
||||
imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
|
||||
[self presentViewController:imagePickerController animated:YES completion:nil];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info
|
||||
{
|
||||
GILog(@"info:%@",info);
|
||||
[picker dismissViewControllerAnimated:YES completion:nil]
|
||||
;
|
||||
|
||||
UIImage*img=[info objectForKey:UIImagePickerControllerEditedImage];
|
||||
UIImage *small = [GIGaUserFileHelper zipScaleWithImage:img];
|
||||
[GIGaUserFileHelper savaShareImange:kUSERSHAREA_IMAGENAME image:small];
|
||||
|
||||
ShareViewController *share = [[ShareViewController alloc] init];
|
||||
[self presentViewController:share animated:NO completion:nil];
|
||||
}
|
||||
|
||||
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker{
|
||||
[picker dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -122,13 +122,15 @@
|
||||
|
||||
-(void)connetction{
|
||||
|
||||
NSURL* url = [[NSURL alloc] initWithString:@"http://wsyts.s1.natapp.cc"];
|
||||
|
||||
//@"connectParams":@{@"token":@""}
|
||||
NSString *token = [GiGaUserDefault getCurentToken];
|
||||
if (!token) {
|
||||
token = @"";
|
||||
}
|
||||
SocketManager *manager = [[SocketManager alloc] initWithSocketURL:url config:@{@"log": @NO, @"forcePolling": @YES,@"extraHeaders":@{@"device":@"ios"},@"token":token}];
|
||||
NSString *urlstr = [NSString stringWithFormat:@"http://wsyts.s1.natapp.cc"];
|
||||
NSURL* url = [[NSURL alloc] initWithString:urlstr];
|
||||
SocketManager *manager = [[SocketManager alloc] initWithSocketURL:url config:@{@"log": @NO, @"forcePolling": @YES,@"extraHeaders":@{@"device":@"ios"},@"connectParams":@{@"token":token}}];
|
||||
|
||||
_manager = manager;
|
||||
_client = manager.defaultSocket;
|
||||
|
||||
@@ -502,9 +502,9 @@
|
||||
// resultVC.model = model;
|
||||
// [self.navigationController pushViewController:resultVC animated:YES];
|
||||
|
||||
[self showAlertGoShareMaskTime];
|
||||
//[self showAlertGoShareMaskTime];
|
||||
|
||||
|
||||
return;
|
||||
GiGaQuestionVC *questionVC = [[GiGaQuestionVC alloc] init];
|
||||
[self.navigationController pushViewController:questionVC animated:YES];
|
||||
|
||||
@@ -667,6 +667,7 @@
|
||||
- (void)progressDidFish{
|
||||
NSLog(@"结束");
|
||||
[self maskTimeEnd];
|
||||
[self showAlertGoShareMaskTime];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
|
||||
@@ -10,9 +10,10 @@
|
||||
#import "MaskTimeShareViewCell.h"
|
||||
#import "MaskShareTimeMidViewCell.h"
|
||||
#import "MaskShareBoootomViewCell.h"
|
||||
|
||||
|
||||
@interface ShareViewController ()<UITableViewDelegate,UITableViewDataSource>
|
||||
#import "MaskTimeShareActionSheet.h"
|
||||
#import "GIGaUserFileHelper.h"
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
@interface ShareViewController ()<UITableViewDelegate,UITableViewDataSource,UIImagePickerControllerDelegate,UINavigationControllerDelegate>
|
||||
@property(nonatomic,strong) UITableView *tab;
|
||||
@property(nonatomic,strong) UIImageView *backimageview ;
|
||||
@property(nonatomic) int curentImageIndex ;
|
||||
@@ -27,9 +28,11 @@
|
||||
|
||||
_curentImageIndex = 0;
|
||||
UIImageView *backimageview = [[UIImageView alloc] init];
|
||||
backimageview.contentMode = UIViewContentModeScaleAspectFill;
|
||||
backimageview.frame = CGRectMake(0, 0,self.view.frame.size.width, self.view.frame.size.height);
|
||||
backimageview.userInteractionEnabled = YES;
|
||||
backimageview.image = [UIImage imageNamed:@"sharebg_1"];
|
||||
backimageview.image = [GIGaUserFileHelper getUserShareImage:kUSERSHAREA_IMAGENAME];
|
||||
|
||||
// self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"sharebg_1"]];
|
||||
self.backimageview = backimageview;
|
||||
[self.view addSubview:backimageview];
|
||||
@@ -37,7 +40,7 @@
|
||||
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
backBtn.frame = CGRectMake(20,44, 40, 40);
|
||||
[backBtn setImage:[UIImage imageNamed:@"btn_moment_back"] forState:UIControlStateNormal];
|
||||
backBtn.backgroundColor = [UIColor redColor];
|
||||
|
||||
[backBtn addTarget:self action:@selector(backBtnAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
[self.view addSubview:backBtn];
|
||||
[self.view insertSubview:backimageview atIndex:0];
|
||||
@@ -145,19 +148,132 @@
|
||||
|
||||
-(void)changeAction{
|
||||
|
||||
_curentImageIndex ++;
|
||||
if (_curentImageIndex == 4) {
|
||||
_curentImageIndex = 0;
|
||||
|
||||
|
||||
MaskTimeShareActionSheet * sheet = [[MaskTimeShareActionSheet alloc] initWithFrame:CGRectMake(0, 0, KMainW, KMainH)];
|
||||
[sheet show:^(NSUInteger index) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
{//手机
|
||||
[self photosAlbum];
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
//系统
|
||||
self->_curentImageIndex ++;
|
||||
if (self->_curentImageIndex == 4) {
|
||||
self->_curentImageIndex = 0;
|
||||
}
|
||||
NSArray *images = @[@"sharebg_2",@"sharebg_3",@"sharebg_4",@"sharebg_5",@"sharebg_1"];
|
||||
|
||||
[self.backimageview setImage:[UIImage imageNamed: images[_curentImageIndex]]];
|
||||
[self.backimageview setImage:[UIImage imageNamed: images[self->_curentImageIndex]]];
|
||||
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
//自拍
|
||||
[self takePhoto];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}];
|
||||
|
||||
[self.view addSubview:sheet];
|
||||
|
||||
}
|
||||
#pragma mark 相册
|
||||
-(void)photosAlbum{
|
||||
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init]; imagePickerController.delegate = self; imagePickerController.allowsEditing = YES;
|
||||
|
||||
//相册
|
||||
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) {
|
||||
//权限
|
||||
|
||||
imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
|
||||
[self presentViewController:imagePickerController animated:YES completion:nil];
|
||||
|
||||
}else{
|
||||
|
||||
NSString *errorStr = @"应用相权册限受限,请在设置中启用";
|
||||
[self jxt_showAlertWithTitle:@"" message:errorStr appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
alertMaker.addActionCancelTitle(@"取消");
|
||||
alertMaker.addActionDefaultTitle(@"去开启");
|
||||
|
||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||
if (buttonIndex == 1) {
|
||||
NSURL *url = [NSURL URLWithString:@"prefs:root=Photos"];
|
||||
if ([[UIApplication sharedApplication] canOpenURL:url]) {
|
||||
[[UIApplication sharedApplication] openURL:url];
|
||||
}
|
||||
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(void)takePhoto{
|
||||
|
||||
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init]; imagePickerController.delegate = self; imagePickerController.allowsEditing = YES;
|
||||
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) {
|
||||
|
||||
//权限判断应用是否有使用相机的权限
|
||||
NSString *mediaType = AVMediaTypeVideo;//读取媒体类型
|
||||
AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:mediaType];//读取设备授权状态
|
||||
if(authStatus == AVAuthorizationStatusRestricted || authStatus == AVAuthorizationStatusDenied){
|
||||
NSString *errorStr = @"应用相机权限受限,请在设置中启用";
|
||||
[self jxt_showAlertWithTitle:@"" message:errorStr appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
alertMaker.addActionCancelTitle(@"取消");
|
||||
alertMaker.addActionDefaultTitle(@"去开启");
|
||||
|
||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||
|
||||
if (buttonIndex == 1) {
|
||||
|
||||
NSString *urlStr = @"App-Prefs:root=Photos";
|
||||
if (@available(iOS 10.0, *)) {
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr] options:@{} completionHandler:nil];
|
||||
} else {
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr]];
|
||||
// Fallback on earlier versions
|
||||
}
|
||||
}
|
||||
}];
|
||||
return;
|
||||
}
|
||||
|
||||
// 设置数据源
|
||||
imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
|
||||
[self presentViewController:imagePickerController animated:YES completion:nil];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info
|
||||
{
|
||||
GILog(@"info:%@",info);
|
||||
[picker dismissViewControllerAnimated:YES completion:nil]
|
||||
;
|
||||
|
||||
UIImage*img=[info objectForKey:UIImagePickerControllerEditedImage];
|
||||
UIImage *small = [GIGaUserFileHelper zipScaleWithImage:img];
|
||||
[GIGaUserFileHelper savaShareImange:kUSERSHAREA_IMAGENAME image:small];
|
||||
|
||||
ShareViewController *share = [[ShareViewController alloc] init];
|
||||
[self presentViewController:share animated:NO completion:nil];
|
||||
}
|
||||
|
||||
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker{
|
||||
[picker dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
-(void)shareBtnAction{
|
||||
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -356,6 +356,7 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
-(void)submitAnswer{
|
||||
|
||||
NSDictionary *params = @{@"singleChoiceList":self.answerArray};
|
||||
@@ -375,8 +376,19 @@
|
||||
BOOL isUserLogin = [GiGaUserDefault isUserLogin];
|
||||
if (isUserLogin) {
|
||||
//展示结果
|
||||
MaskTestResultVC *reusltVC = [[MaskTestResultVC alloc] init];
|
||||
[self.navigationController pushViewController:reusltVC animated:YES];
|
||||
NSDictionary *dic = @{
|
||||
@"dryness":@"0.41",
|
||||
@"drynessPercent":@"41%",
|
||||
@"mask":@"",
|
||||
@"minute":@"19",
|
||||
@"oiliness":@"0.59",
|
||||
@"oilinessPercent":@"59%"
|
||||
};
|
||||
MaskTestResult *model =[[MaskTestResult alloc] initWithDictionary:dic error:nil];
|
||||
MaskTestResultVC *resultVC = [[MaskTestResultVC alloc] init];
|
||||
resultVC.model = model;
|
||||
[self.navigationController pushViewController:resultVC animated:YES];
|
||||
|
||||
}else{
|
||||
[self jxt_showAlertWithTitle:@"对不起您还没有登录" message:@"请登录后查看肤质测试结果" appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
alertMaker.addActionCancelTitle(@"返回首页");
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#import "MaskResultMinViewCell.h"
|
||||
#import "MaskResultPercentCell.h"
|
||||
#import "MaskResultShareViewCell.h"
|
||||
#import "SHareTestImageVC.h"
|
||||
|
||||
#import "GiGaFileNanager.h"
|
||||
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
//
|
||||
// SHareTestImageVC.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/21.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GiGaBaseViewController.h"
|
||||
|
||||
@interface SHareTestImageVC : GiGaBaseViewController
|
||||
@property (nonatomic,strong) UIImage *image ;
|
||||
|
||||
@end
|
||||
@@ -1,43 +0,0 @@
|
||||
//
|
||||
// SHareTestImageVC.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/21.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SHareTestImageVC.h"
|
||||
|
||||
@interface SHareTestImageVC ()
|
||||
|
||||
@end
|
||||
|
||||
@implementation SHareTestImageVC
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view from its nib.
|
||||
UIImageView *ima = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width,self.view.frame.size.height)];
|
||||
ima.contentMode = UIViewContentModeScaleAspectFit;
|
||||
|
||||
ima.image = self.image;
|
||||
[self.view addSubview:ima];
|
||||
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
[super didReceiveMemoryWarning];
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
@@ -1,22 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SHareTestImageVC">
|
||||
<connections>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<viewLayoutGuide key="safeArea" id="Q5M-cg-NOt"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// MaskActionSheetViewCell.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/22.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface MaskActionSheetViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *sheetTitle;
|
||||
-(void)comfirmTitles:(NSIndexPath *)indepath;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// MaskActionSheetViewCell.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/22.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MaskActionSheetViewCell.h"
|
||||
|
||||
@implementation MaskActionSheetViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
-(void)comfirmTitles:(NSIndexPath *)indepath
|
||||
{
|
||||
NSArray *titles = @[@"手机相册",@"系统相册",@"自拍"];
|
||||
self.sheetTitle.text = titles[indepath.row];
|
||||
|
||||
}
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="MaskActionSheetViewCell" id="KGk-i7-Jjw" customClass="MaskActionSheetViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="40V-PX-LhN">
|
||||
<rect key="frame" x="137" y="8" width="47" height="26"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="18"/>
|
||||
<color key="textColor" red="0.51372549019607838" green="0.039215686274509803" blue="0.039215686274509803" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ngI-qP-hKZ">
|
||||
<rect key="frame" x="0.0" y="43.5" width="320" height="0.5"/>
|
||||
<color key="backgroundColor" red="0.87058823529411766" green="0.87058823529411766" blue="0.87058823529411766" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="0.5" id="cs5-Qf-Vk6"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="40V-PX-LhN" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="Fgn-aW-scP"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ngI-qP-hKZ" secondAttribute="trailing" id="Hx7-pI-vWZ"/>
|
||||
<constraint firstItem="ngI-qP-hKZ" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="UY4-gg-DTG"/>
|
||||
<constraint firstItem="40V-PX-LhN" firstAttribute="centerX" secondItem="H2p-sc-9uM" secondAttribute="centerX" id="WWw-Zh-jsa"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ngI-qP-hKZ" secondAttribute="bottom" constant="-0.5" id="yOL-n1-moT"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<connections>
|
||||
<outlet property="sheetTitle" destination="40V-PX-LhN" id="jzf-mX-x9L"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// MaskTimeShareActionSheet.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/22.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
typedef void (^actionSheetAction)(NSUInteger index);
|
||||
@interface MaskTimeShareActionSheet : UIView
|
||||
@property(nonatomic,copy) actionSheetAction action;
|
||||
-(void)show:(actionSheetAction)action;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,116 @@
|
||||
//
|
||||
// MaskTimeShareActionSheet.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/22.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "MaskTimeShareActionSheet.h"
|
||||
#import "MaskActionSheetViewCell.h"
|
||||
|
||||
@interface MaskTimeShareActionSheet()<UITableViewDelegate,UITableViewDataSource>
|
||||
@property(nonatomic,strong) UITableView *tabview;
|
||||
@end
|
||||
|
||||
@implementation MaskTimeShareActionSheet
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.3]; ;
|
||||
[self creatUI];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)creatUI{
|
||||
|
||||
|
||||
|
||||
UIView *holdview =[[UIView alloc] init];
|
||||
holdview.frame =CGRectMake(0,KMainH - 216 - 60 -20 , KMainW, 216 + 60 +20);
|
||||
holdview.backgroundColor = [UIColor whiteColor];
|
||||
// CGRect backRect= holdview.frame;
|
||||
//
|
||||
// UIBezierPath *maskPath=[UIBezierPath bezierPathWithRoundedRect:backRect byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(15, 15)];
|
||||
// CAShapeLayer *maskLayer =[[CAShapeLayer alloc] init];
|
||||
// maskLayer.frame = backRect;
|
||||
// maskLayer.path = maskPath.CGPath;
|
||||
// holdview.layer.mask = maskLayer;
|
||||
holdview.layer.masksToBounds = YES;
|
||||
holdview.layer.cornerRadius = 10;
|
||||
[self addSubview:holdview];
|
||||
|
||||
self.tabview = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, KMainW, 216 + 60) style:UITableViewStylePlain];
|
||||
self.tabview.backgroundColor = [UIColor whiteColor];
|
||||
self.tabview.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
self.tabview.delegate = self;
|
||||
self.tabview.scrollEnabled = NO;
|
||||
self.tabview.dataSource = self;
|
||||
|
||||
UIButton *cancleBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[cancleBtn setTitle:@"取消" forState:UIControlStateNormal];
|
||||
[cancleBtn setTitleColor:GIGARGB(165,165, 165, 1) forState:UIControlStateNormal];
|
||||
[cancleBtn addTarget:self action:@selector(cancelAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
cancleBtn.frame = CGRectMake(0,1, KMainW,60);
|
||||
|
||||
self.tabview.tableFooterView = cancleBtn;
|
||||
[holdview addSubview:self.tabview];
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
MaskActionSheetViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MaskActionSheetViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"MaskActionSheetViewCell" owner:self options:nil] lastObject];
|
||||
}
|
||||
[cell comfirmTitles:indexPath];
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
return 54;
|
||||
}
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
|
||||
if (self.action) {
|
||||
self.action(indexPath.row);
|
||||
[self cancleDissmiss];
|
||||
}
|
||||
}
|
||||
|
||||
-(void)show:(actionSheetAction)action{
|
||||
|
||||
self.action = action;
|
||||
|
||||
}
|
||||
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
|
||||
if ([touches anyObject].view != self.tabview) {
|
||||
[self cancleDissmiss];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-(void)cancelAction{
|
||||
[self cancleDissmiss];
|
||||
}
|
||||
|
||||
-(void)cancleDissmiss{
|
||||
[UIView animateWithDuration:1.0 animations:^{
|
||||
self.tabview.frame = CGRectMake(0, KMainH - 216, KMainW, 0);
|
||||
}];
|
||||
[self removeFromSuperview];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
@@ -7,6 +7,13 @@
|
||||
//
|
||||
|
||||
#import "GiGaFeedBackViewController.h"
|
||||
#import "GIGaFeedQQViewCell.h"
|
||||
#import "GIGaFeedPhontosViewCell.h"
|
||||
#import "GiGaFeedContentViewCell.h"
|
||||
#import "GiGaFeedLeiIingViewCell.h"
|
||||
#import "SJPhotoPicker.h"
|
||||
#import "GiGaNetManager.h"
|
||||
#import "GiGaAPIResult.h"
|
||||
|
||||
@interface GiGaFeedBackViewController ()
|
||||
|
||||
@@ -17,7 +24,171 @@
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self addNavTitile:@"意见反馈"];
|
||||
|
||||
[self.view addSubview:self.tableView];
|
||||
self.tableView.delegate = self;
|
||||
self.tableView.dataSource = self;
|
||||
self.tableView.backgroundColor = GIGA_MAIN_BGCOLOR;
|
||||
self.tableView.separatorStyle = UITableViewCellSelectionStyleNone;
|
||||
self.tableView.sectionFooterHeight = 0;
|
||||
self.tableView.estimatedSectionFooterHeight= 0;
|
||||
self.tableView.estimatedSectionHeaderHeight = 0;
|
||||
|
||||
|
||||
self.tableView.frame = CGRectMake(0, 1, KMainW, self.view.bounds.size.height - SAFE_NAV_HEIGHT);
|
||||
|
||||
[self.tableView registerClass:[GIGaFeedPhontosViewCell class] forCellReuseIdentifier:@"GIGaFeedPhontosViewCell"];
|
||||
// Do any additional setup after loading the view.
|
||||
UIView *footer = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 80)];
|
||||
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
btn.layer.masksToBounds = YES;
|
||||
btn.layer.cornerRadius = 20;
|
||||
btn.frame = CGRectMake((self.view.frame.size.width - 245) /2 , 20, 245,40);
|
||||
btn.backgroundColor = [UIColor whiteColor];
|
||||
NSAttributedString *atti = [GiGaHelper stringWithText:@"提交" textColor:GIGA_MAIN_BGCOLOR textFont:GIGA_TEXTFONTBOLD(18) leterSpace:0];
|
||||
[btn addTarget:self action:@selector(tijiaoAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
[btn setAttributedTitle:atti forState:UIControlStateNormal];
|
||||
[footer addSubview:btn];
|
||||
self.tableView.tableFooterView = footer;
|
||||
|
||||
|
||||
}
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
|
||||
return 4;
|
||||
}
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (indexPath.section == 0) {
|
||||
GiGaFeedLeiIingViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GiGaFeedLeiIingViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"GiGaFeedLeiIingViewCell" owner:self options:nil] lastObject];
|
||||
}
|
||||
return cell;
|
||||
}else if (indexPath.section == 1){
|
||||
GiGaFeedContentViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GiGaFeedContentViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"GiGaFeedContentViewCell" owner:self options:nil] lastObject];
|
||||
}
|
||||
return cell;
|
||||
}else if (indexPath.section == 2){
|
||||
GIGaFeedQQViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GIGaFeedQQViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"GIGaFeedQQViewCell" owner:self options:nil] lastObject];
|
||||
}
|
||||
return cell;
|
||||
}else if (indexPath.section == 3){
|
||||
|
||||
GIGaFeedPhontosViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"GIGaFeedPhontosViewCell"];
|
||||
if (!cell) {
|
||||
cell = [[GIGaFeedPhontosViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"GIGaFeedPhontosViewCell"];;
|
||||
}
|
||||
|
||||
__weak typeof(cell) weakCell = cell;
|
||||
cell.pickerBalock = ^{
|
||||
[[SJPhotoPicker shareSJPhotoPicker] showPhotoPickerToController:self pickedAssets:^(NSArray<PHAsset *> *assets) {
|
||||
// 添加按钮6张以上被遮挡可不写
|
||||
// if ((weakCell.images.count + assets.count) > 6) {
|
||||
// GIGA_ShowToast(@"最多六张");
|
||||
// return ;
|
||||
// }
|
||||
[weakCell.images addObjectsFromArray:assets];
|
||||
//weakSelf.images = [NSMutableArray arrayWithArray:assets];
|
||||
[weakCell.collectionView reloadData];
|
||||
|
||||
}];
|
||||
};
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
if (indexPath.section == 0) {
|
||||
return 40;
|
||||
}else if (indexPath.section == 1){
|
||||
return 142;
|
||||
}else if (indexPath.section == 2){
|
||||
return 40;
|
||||
}else if (indexPath.section == 3){
|
||||
return 218;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
|
||||
if (section == 3) {
|
||||
return 36;
|
||||
}else{
|
||||
return 12;
|
||||
}
|
||||
}
|
||||
|
||||
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
|
||||
if (section == 3) {
|
||||
UIView *view = [[UIView alloc] init];
|
||||
UILabel *label = [[UILabel alloc] init];
|
||||
label.frame = CGRectMake(15,0, 200, 36);
|
||||
label.font = GIGA_TEXTFONTMEDIUM(13);
|
||||
label.text= @"上传图片(最多6张)";
|
||||
label.textColor = [UIColor whiteColor];
|
||||
[view addSubview:label];
|
||||
return view;
|
||||
}
|
||||
UIView *view = [[UIView alloc] init];
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
|
||||
return 0.1;
|
||||
}
|
||||
|
||||
#pragma mark 提交
|
||||
|
||||
-(void)tijiaoAction{
|
||||
GIGaFeedPhontosViewCell *cell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:3]];
|
||||
NSArray *names =cell.imageNames;
|
||||
|
||||
NSLog(@"names:%@",names);
|
||||
|
||||
GiGaFeedLeiIingViewCell *kindcell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
|
||||
if ([kindcell.kidLabel.text isEqualToString:@"选择反馈类型"]) {
|
||||
GIGA_ShowToast(@"请选择评论类型");
|
||||
return;
|
||||
}
|
||||
|
||||
GiGaFeedContentViewCell *contencell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:1]];
|
||||
|
||||
if (contencell.contentFiled.text.length==0) {
|
||||
GIGA_ShowToast(@"请输入评论");
|
||||
return;
|
||||
}
|
||||
|
||||
GIGaFeedQQViewCell *qqcell = [self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:2 inSection:3]];
|
||||
if (qqcell.QTextFiled.text.length == 0) {
|
||||
qqcell.QTextFiled.text = @"";
|
||||
}
|
||||
|
||||
|
||||
if (names.count <= 0) {
|
||||
GIGA_ShowToast(@"请选择图片");
|
||||
return;
|
||||
}
|
||||
|
||||
[GiGaNetManager uploadImage:@"sys/sysdict/v1/maskproposaltype" imageNames:names parms:@{} responseBlock:^(NSDictionary *responseDict, NSDictionary *responseHeaderFields, NSError *error) {
|
||||
if (error) {
|
||||
GILog(@"err:%@",error.localizedDescription);
|
||||
}else{
|
||||
GiGaAPIResult *result = [[GiGaAPIResult alloc] initWithDictionary:responseDict];
|
||||
GIGA_ShowToast(result.message);
|
||||
}
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
@@ -25,14 +196,6 @@
|
||||
// Dispose of any resources that can be recreated.
|
||||
}
|
||||
|
||||
/*
|
||||
#pragma mark - Navigation
|
||||
|
||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
||||
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
|
||||
// Get the new view controller using [segue destinationViewController].
|
||||
// Pass the selected object to the new view controller.
|
||||
}
|
||||
*/
|
||||
|
||||
@end
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
}
|
||||
|
||||
int leng = [GiGaHelper convertToInt: self.user.nickName];
|
||||
if ( leng >40 ) {
|
||||
if ( self.user.nickName.length >40 ) {
|
||||
GIGA_ShowToast(@"用户名1-40字符长度")
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// GIGaFeedImagsCollectionCell.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/22.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface GIGaFeedImagsCollectionCell : UICollectionViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *uploadImageView;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *delecBtn;
|
||||
@property (weak, nonatomic) IBOutlet UIView *holdView;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *holdImageView;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// GIGaFeedImagsCollectionCell.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/22.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GIGaFeedImagsCollectionCell.h"
|
||||
|
||||
@implementation GIGaFeedImagsCollectionCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
[self.holdView bringSubviewToFront:self.delecBtn];
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="GIGaFeedImagsCollectionCell" id="gTV-IL-0wX" customClass="GIGaFeedImagsCollectionCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="104" height="104"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="104" height="104"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="j5W-en-Qt6">
|
||||
<rect key="frame" x="0.0" y="0.0" width="104" height="104"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_holder" translatesAutoresizingMaskIntoConstraints="NO" id="OI4-At-zxC">
|
||||
<rect key="frame" x="30" y="22" width="44" height="61"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="x1H-ve-Fgf">
|
||||
<rect key="frame" x="54" y="0.0" width="50" height="43"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="43" id="F0v-0l-iMj"/>
|
||||
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="50" id="Fz8-ZA-RPb"/>
|
||||
<constraint firstAttribute="height" constant="43" id="l0y-pL-Dc1"/>
|
||||
<constraint firstAttribute="width" constant="50" id="wna-nz-SXe"/>
|
||||
</constraints>
|
||||
<inset key="imageEdgeInsets" minX="25" minY="0.0" maxX="0.0" maxY="17"/>
|
||||
<state key="normal" image="btn_back"/>
|
||||
</button>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="0OC-Nu-4Es">
|
||||
<rect key="frame" x="0.0" y="0.0" width="104" height="104"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.87058823529999996" green="0.87058823529999996" blue="0.87058823529999996" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="OI4-At-zxC" firstAttribute="top" secondItem="j5W-en-Qt6" secondAttribute="top" constant="22" id="4LG-wM-F44"/>
|
||||
<constraint firstItem="0OC-Nu-4Es" firstAttribute="leading" secondItem="j5W-en-Qt6" secondAttribute="leading" id="AwC-NQ-dKH"/>
|
||||
<constraint firstItem="0OC-Nu-4Es" firstAttribute="top" secondItem="j5W-en-Qt6" secondAttribute="top" id="F26-JE-MfS"/>
|
||||
<constraint firstAttribute="trailing" secondItem="x1H-ve-Fgf" secondAttribute="trailing" id="Slm-mX-H0J"/>
|
||||
<constraint firstItem="x1H-ve-Fgf" firstAttribute="top" secondItem="j5W-en-Qt6" secondAttribute="top" id="Sok-Vd-Aaf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="OI4-At-zxC" secondAttribute="trailing" constant="30" id="XGW-QQ-a0R"/>
|
||||
<constraint firstAttribute="bottom" secondItem="OI4-At-zxC" secondAttribute="bottom" constant="21" id="iSn-Io-4fL"/>
|
||||
<constraint firstAttribute="bottom" secondItem="0OC-Nu-4Es" secondAttribute="bottom" id="jz8-lK-9jD"/>
|
||||
<constraint firstItem="OI4-At-zxC" firstAttribute="leading" secondItem="j5W-en-Qt6" secondAttribute="leading" constant="30" id="kzn-UF-b6Y"/>
|
||||
<constraint firstAttribute="trailing" secondItem="0OC-Nu-4Es" secondAttribute="trailing" id="sLW-N6-cte"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="j5W-en-Qt6" secondAttribute="trailing" id="65s-PX-QHc"/>
|
||||
<constraint firstItem="j5W-en-Qt6" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="EHN-cC-fqn"/>
|
||||
<constraint firstAttribute="bottom" secondItem="j5W-en-Qt6" secondAttribute="bottom" id="NC9-vb-9D2"/>
|
||||
<constraint firstItem="j5W-en-Qt6" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="eCP-n4-EO0"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="SEy-5g-ep8"/>
|
||||
<connections>
|
||||
<outlet property="delecBtn" destination="x1H-ve-Fgf" id="INd-yD-1pz"/>
|
||||
<outlet property="holdImageView" destination="OI4-At-zxC" id="oBf-Rq-vfK"/>
|
||||
<outlet property="holdView" destination="j5W-en-Qt6" id="gzn-Kv-Cam"/>
|
||||
<outlet property="uploadImageView" destination="0OC-Nu-4Es" id="Igo-Ca-Fx3"/>
|
||||
</connections>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="btn_back" width="22" height="22"/>
|
||||
<image name="img_holder" width="51" height="43"/>
|
||||
</resources>
|
||||
</document>
|
||||
@@ -0,0 +1,19 @@
|
||||
//
|
||||
// GIGaFeedPhontosViewCell.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/22.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Photos/PHAsset.h>
|
||||
typedef void(^GiGaPhotoPickerBlock)(void);
|
||||
@interface GIGaFeedPhontosViewCell : UITableViewCell
|
||||
@property(nonatomic,copy) GiGaPhotoPickerBlock pickerBalock;
|
||||
@property(nonatomic,strong) NSMutableArray *images;
|
||||
@property(nonatomic,strong) UICollectionView *collectionView;
|
||||
-(void)photoPikerComplete:(GiGaPhotoPickerBlock)pikerComplete;
|
||||
@property(nonatomic,strong) NSMutableArray *imageNames;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,188 @@
|
||||
//
|
||||
// GIGaFeedPhontosViewCell.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/22.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GIGaFeedPhontosViewCell.h"
|
||||
#import "GIGaFeedImagsCollectionCell.h"
|
||||
#import "GiGaFeedImagsActionCell.h"
|
||||
#import "SJPhotoPickerManager.h"
|
||||
#import "SJPhotoPicker.h"
|
||||
#import "GIGaUserFileHelper.h"
|
||||
|
||||
@interface GIGaFeedPhontosViewCell()<UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout>
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@implementation GIGaFeedPhontosViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
|
||||
|
||||
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
||||
if (self) {
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
_images = [NSMutableArray new];
|
||||
|
||||
[self creatUI];
|
||||
|
||||
}
|
||||
return self;
|
||||
}
|
||||
- (NSMutableArray *)imageNames{
|
||||
if (!_imageNames) {
|
||||
_imageNames = [NSMutableArray new];
|
||||
}
|
||||
return _imageNames;
|
||||
}
|
||||
-(void)creatUI{
|
||||
|
||||
UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
|
||||
flowLayout.minimumLineSpacing = 1;
|
||||
flowLayout.minimumInteritemSpacing = .1;
|
||||
|
||||
CGFloat width = (KMainW-15*2 - 22*2)/3;
|
||||
flowLayout.itemSize = CGSizeMake(width,width);
|
||||
//展示两行
|
||||
//CGFloat HCELL= (itemH*1+1)*2;
|
||||
|
||||
_collectionView=[[UICollectionView alloc]initWithFrame:CGRectMake(0,0,KMainW, 218) collectionViewLayout:flowLayout];
|
||||
|
||||
_collectionView.delegate=self;
|
||||
_collectionView.dataSource=self;
|
||||
_collectionView.bounces=NO;
|
||||
_collectionView.scrollEnabled=NO;
|
||||
_collectionView.showsVerticalScrollIndicator=NO;
|
||||
_collectionView.backgroundColor = GIGA_MAIN_BGCOLOR;
|
||||
[self addSubview:_collectionView];
|
||||
[_collectionView registerNib:[UINib nibWithNibName:@"GiGaFeedImagsActionCell" bundle:nil] forCellWithReuseIdentifier:@"GiGaFeedImagsActionCell"];
|
||||
[_collectionView registerNib:[UINib nibWithNibName:@"GIGaFeedImagsCollectionCell" bundle:nil] forCellWithReuseIdentifier:@"GIGaFeedImagsCollectionCell"];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark <UICollectionViewDataSource>
|
||||
|
||||
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
|
||||
return 1 + self.images.count;
|
||||
}
|
||||
|
||||
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (indexPath.row == self.images.count) {
|
||||
GiGaFeedImagsActionCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"GiGaFeedImagsActionCell" forIndexPath:indexPath];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"GiGaFeedImagsActionCell" owner:self options:nil] lastObject];
|
||||
}
|
||||
[cell.imageAdd addTarget:self action:@selector(addBtnAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
return cell;
|
||||
}
|
||||
|
||||
GIGaFeedImagsCollectionCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"GIGaFeedImagsCollectionCell" forIndexPath:indexPath];
|
||||
if (!cell) {
|
||||
cell = [[[NSBundle mainBundle] loadNibNamed:@"GIGaFeedImagsCollectionCell" owner:self options:nil] lastObject];
|
||||
}
|
||||
|
||||
cell.delecBtn.tag = indexPath.row;
|
||||
[cell.delecBtn addTarget:self action:@selector(delecBtnAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
//PHImageManagerMaximumSize
|
||||
[self.imageNames removeAllObjects];
|
||||
[[SJPhotoPickerManager shareSJPhotoPickerManager] requestImageForPHAsset:self.images[indexPath.row] targetSize:CGSizeMake(200, 200) imageResult:^(UIImage *image) {
|
||||
cell.uploadImageView.image = image;
|
||||
if (image) {
|
||||
cell.holdImageView.hidden = YES;
|
||||
}else{
|
||||
cell.holdImageView.hidden = NO;
|
||||
}
|
||||
cell.holdView.backgroundColor = [UIColor clearColor];
|
||||
NSString *name = [NSString stringWithFormat:@"gigafeed_index%ld",(long)indexPath.row];
|
||||
[GIGaUserFileHelper saveUserFeedbackImag:name image:image];
|
||||
if ([self.imageNames containsObject: name]) {
|
||||
[self.imageNames removeObject:name];
|
||||
}
|
||||
|
||||
[self.imageNames addObject:name];
|
||||
|
||||
}];
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
|
||||
CGFloat width = (KMainW-15*2 - 22*2)/3;
|
||||
CGSize itemSize = CGSizeMake(width,width);
|
||||
return itemSize;
|
||||
|
||||
}
|
||||
|
||||
//距离上下左右的间距
|
||||
-(UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section
|
||||
{
|
||||
|
||||
|
||||
return UIEdgeInsetsMake(0,15,0, 15);
|
||||
|
||||
}
|
||||
|
||||
-(CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section
|
||||
{
|
||||
//设置最小的列间距
|
||||
|
||||
return 22.0f;
|
||||
|
||||
}
|
||||
|
||||
-(CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section
|
||||
{
|
||||
//设置最小的行间距
|
||||
|
||||
return 10.0f;
|
||||
|
||||
}
|
||||
|
||||
-(void)delecBtnAction:(UIButton *)btn{
|
||||
GILog(@"删除");
|
||||
NSUInteger index = btn.tag;
|
||||
[self.images removeObjectAtIndex:index];
|
||||
[GIGaUserFileHelper delectAllfeedimages];
|
||||
[self.imageNames removeAllObjects];
|
||||
[self.collectionView reloadData];
|
||||
|
||||
}
|
||||
|
||||
-(void)addBtnAction:(UIButton*)btn{
|
||||
|
||||
if (self.pickerBalock) {
|
||||
self.pickerBalock();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
- (void)photoPikerComplete:(GiGaPhotoPickerBlock)pikerComplete{
|
||||
|
||||
if (self.pickerBalock) {
|
||||
self.pickerBalock = pikerComplete;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// GIGaFeedQQViewCell.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/22.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface GIGaFeedQQViewCell : UITableViewCell
|
||||
|
||||
@property (weak, nonatomic) IBOutlet UITextField *QTextFiled;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// GIGaFeedQQViewCell.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/22.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GIGaFeedQQViewCell.h"
|
||||
|
||||
@implementation GIGaFeedQQViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="GIGaFeedQQViewCell" id="KGk-i7-Jjw" customClass="GIGaFeedQQViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wzf-76-7C1">
|
||||
<rect key="frame" x="15" y="0.0" width="290" height="44"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="手机/邮箱/QQ" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Wtv-qw-ARD">
|
||||
<rect key="frame" x="14" y="6" width="261" height="33"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="33" id="mQh-Pp-SNm"/>
|
||||
</constraints>
|
||||
<color key="textColor" red="0.75686274509803919" green="0.75686274509803919" blue="0.75686274509803919" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="13"/>
|
||||
<textInputTraits key="textInputTraits"/>
|
||||
</textField>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Wtv-qw-ARD" firstAttribute="centerY" secondItem="wzf-76-7C1" secondAttribute="centerY" id="CdQ-gv-ktH"/>
|
||||
<constraint firstItem="Wtv-qw-ARD" firstAttribute="leading" secondItem="wzf-76-7C1" secondAttribute="leading" constant="14" id="oHV-7F-CIq"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Wtv-qw-ARD" secondAttribute="trailing" constant="15" id="rEL-dx-AOc"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="wzf-76-7C1" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="MCC-cD-Kmh"/>
|
||||
<constraint firstItem="wzf-76-7C1" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="dSK-l2-Ked"/>
|
||||
<constraint firstItem="wzf-76-7C1" firstAttribute="height" secondItem="H2p-sc-9uM" secondAttribute="height" id="eqo-yc-ffi"/>
|
||||
<constraint firstAttribute="trailing" secondItem="wzf-76-7C1" secondAttribute="trailing" constant="15" id="gxV-s1-8ig"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" red="0.51372549020000002" green="0.039215686270000001" blue="0.039215686270000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<connections>
|
||||
<outlet property="QTextFiled" destination="Wtv-qw-ARD" id="B0a-V2-ffA"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// GiGaFeedContentViewCell.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/22.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface GiGaFeedContentViewCell : UITableViewCell<UITextViewDelegate>
|
||||
@property (weak, nonatomic) IBOutlet UITextView *contentFiled;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *holdLabe;
|
||||
@property (weak, nonatomic) IBOutlet UILabel *numberCountLabe;
|
||||
@property (nonatomic,strong) NSString *textMAx;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,61 @@
|
||||
//
|
||||
// GiGaFeedContentViewCell.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/22.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GiGaFeedContentViewCell.h"
|
||||
|
||||
@implementation GiGaFeedContentViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
self.contentFiled.delegate =self;
|
||||
}
|
||||
|
||||
- (void)textViewDidBeginEditing:(UITextView *)textView{
|
||||
if (textView == self.contentFiled) {
|
||||
self.holdLabe.hidden = YES;
|
||||
}
|
||||
|
||||
}
|
||||
- (void)textViewDidChange:(UITextView *)textView
|
||||
{
|
||||
if (textView == self.contentFiled) {
|
||||
if (textView.text.length == 0) {
|
||||
self.holdLabe.hidden = NO;
|
||||
}
|
||||
|
||||
if ( textView.text.length <=100 ) {
|
||||
|
||||
self.numberCountLabe.text = [NSString stringWithFormat:@"%lu/100",(unsigned long)textView.text.length];
|
||||
self.contentFiled.text = textView.text;
|
||||
self.textMAx = textView.text;
|
||||
}else{
|
||||
textView.text = self.textMAx;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text{
|
||||
|
||||
|
||||
// if ( textView.text.length >100 ) {
|
||||
//
|
||||
// return NO;
|
||||
// }
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="GiGaFeedContentViewCell" id="KGk-i7-Jjw" customClass="GiGaFeedContentViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="142"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="141.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nRM-PI-P0X">
|
||||
<rect key="frame" x="15" y="0.0" width="290" height="142"/>
|
||||
<subviews>
|
||||
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="D4t-0d-ayG">
|
||||
<rect key="frame" x="10" y="0.0" width="268" height="142"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<color key="textColor" red="0.75686274509803919" green="0.75686274509803919" blue="0.75686274509803919" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="13"/>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||
</textView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0/100" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6ey-qR-EDX">
|
||||
<rect key="frame" x="223" y="115" width="36" height="19"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="13"/>
|
||||
<color key="textColor" red="0.1764705882352941" green="0.1764705882352941" blue="0.1764705882352941" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="来了就说几句吧~" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TLh-tj-C89">
|
||||
<rect key="frame" x="14" y="8" width="105" height="19"/>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="13"/>
|
||||
<color key="textColor" red="0.75686274509999996" green="0.75686274509999996" blue="0.75686274509999996" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="D4t-0d-ayG" firstAttribute="centerY" secondItem="nRM-PI-P0X" secondAttribute="centerY" id="EHj-eM-2kn"/>
|
||||
<constraint firstAttribute="trailing" secondItem="6ey-qR-EDX" secondAttribute="trailing" constant="31" id="FK7-pv-afK"/>
|
||||
<constraint firstAttribute="trailing" secondItem="D4t-0d-ayG" secondAttribute="trailing" constant="12" id="MJo-rQ-g8F"/>
|
||||
<constraint firstItem="TLh-tj-C89" firstAttribute="leading" secondItem="nRM-PI-P0X" secondAttribute="leading" constant="14" id="YH1-Rd-AZx"/>
|
||||
<constraint firstAttribute="bottom" secondItem="6ey-qR-EDX" secondAttribute="bottom" constant="8" id="Yq4-es-zmm"/>
|
||||
<constraint firstItem="D4t-0d-ayG" firstAttribute="height" secondItem="nRM-PI-P0X" secondAttribute="height" id="Zcd-Mh-Sak"/>
|
||||
<constraint firstItem="TLh-tj-C89" firstAttribute="top" secondItem="nRM-PI-P0X" secondAttribute="top" constant="8" id="cmF-R5-xvZ"/>
|
||||
<constraint firstItem="D4t-0d-ayG" firstAttribute="leading" secondItem="nRM-PI-P0X" secondAttribute="leading" constant="10" id="wdz-mP-xbZ"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="nRM-PI-P0X" secondAttribute="trailing" constant="15" id="2KC-jP-QlB"/>
|
||||
<constraint firstItem="nRM-PI-P0X" firstAttribute="height" secondItem="H2p-sc-9uM" secondAttribute="height" id="ChH-Nb-WGV"/>
|
||||
<constraint firstItem="nRM-PI-P0X" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="PfZ-i6-10r"/>
|
||||
<constraint firstItem="nRM-PI-P0X" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="UuE-HW-Hxu"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" red="0.51372549020000002" green="0.039215686270000001" blue="0.039215686270000001" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<connections>
|
||||
<outlet property="contentFiled" destination="D4t-0d-ayG" id="gfZ-CZ-dHf"/>
|
||||
<outlet property="holdLabe" destination="TLh-tj-C89" id="e83-Wv-Snm"/>
|
||||
<outlet property="numberCountLabe" destination="6ey-qR-EDX" id="5hH-Ae-moq"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
||||
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// GiGaFeedImagsActionCell.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/22.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface GiGaFeedImagsActionCell : UICollectionViewCell
|
||||
@property (weak, nonatomic) IBOutlet UIButton *imageAdd;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// GiGaFeedImagsActionCell.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/22.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GiGaFeedImagsActionCell.h"
|
||||
|
||||
@implementation GiGaFeedImagsActionCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="GiGaFeedImagsActionCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="104" height="104"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="104" height="104"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="p4F-LQ-Mgo">
|
||||
<rect key="frame" x="0.0" y="0.0" width="104" height="104"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="img_camera" translatesAutoresizingMaskIntoConstraints="NO" id="PNN-vx-9XC">
|
||||
<rect key="frame" x="27" y="19" width="50" height="67"/>
|
||||
</imageView>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aOT-f4-LRi">
|
||||
<rect key="frame" x="0.0" y="0.0" width="104" height="104"/>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="aOT-f4-LRi" firstAttribute="leading" secondItem="p4F-LQ-Mgo" secondAttribute="leading" id="101-Yv-yNU"/>
|
||||
<constraint firstItem="aOT-f4-LRi" firstAttribute="leading" secondItem="p4F-LQ-Mgo" secondAttribute="leading" id="4fs-og-ovQ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="aOT-f4-LRi" secondAttribute="bottom" id="57z-nN-ezQ"/>
|
||||
<constraint firstItem="PNN-vx-9XC" firstAttribute="leading" secondItem="p4F-LQ-Mgo" secondAttribute="leading" constant="27" id="9So-vG-wnQ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="aOT-f4-LRi" secondAttribute="trailing" id="IgC-Sy-mac"/>
|
||||
<constraint firstItem="aOT-f4-LRi" firstAttribute="top" secondItem="p4F-LQ-Mgo" secondAttribute="top" id="MZN-X1-hFr"/>
|
||||
<constraint firstAttribute="bottom" secondItem="PNN-vx-9XC" secondAttribute="bottom" constant="18" id="N3W-xo-blq"/>
|
||||
<constraint firstAttribute="trailing" secondItem="aOT-f4-LRi" secondAttribute="trailing" id="gRL-cn-YfY"/>
|
||||
<constraint firstItem="PNN-vx-9XC" firstAttribute="top" secondItem="p4F-LQ-Mgo" secondAttribute="top" constant="19" id="hf8-gT-7Cs"/>
|
||||
<constraint firstAttribute="bottom" secondItem="aOT-f4-LRi" secondAttribute="bottom" id="j7a-2n-lmS"/>
|
||||
<constraint firstAttribute="trailing" secondItem="PNN-vx-9XC" secondAttribute="trailing" constant="27" id="ksJ-F4-Qht"/>
|
||||
<constraint firstItem="aOT-f4-LRi" firstAttribute="top" secondItem="p4F-LQ-Mgo" secondAttribute="top" id="nCc-n1-PPA"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstItem="p4F-LQ-Mgo" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="ca0-vZ-Eds"/>
|
||||
<constraint firstAttribute="trailing" secondItem="p4F-LQ-Mgo" secondAttribute="trailing" id="fBl-J5-XBM"/>
|
||||
<constraint firstItem="p4F-LQ-Mgo" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="wFG-CR-yWw"/>
|
||||
<constraint firstAttribute="bottom" secondItem="p4F-LQ-Mgo" secondAttribute="bottom" id="yUE-Oe-gvn"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="SEy-5g-ep8"/>
|
||||
<connections>
|
||||
<outlet property="imageAdd" destination="aOT-f4-LRi" id="has-hX-ccK"/>
|
||||
</connections>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="img_camera" width="54" height="48"/>
|
||||
</resources>
|
||||
</document>
|
||||
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// GiGaFeedLeiIingViewCell.h
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/22.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface GiGaFeedLeiIingViewCell : UITableViewCell
|
||||
@property (weak, nonatomic) IBOutlet UILabel *kidLabel;
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// GiGaFeedLeiIingViewCell.m
|
||||
// GIGA
|
||||
//
|
||||
// Created by lianxiang on 2018/9/22.
|
||||
// Copyright © 2018年 com.giga.ios. All rights reserved.
|
||||
//
|
||||
|
||||
#import "GiGaFeedLeiIingViewCell.h"
|
||||
|
||||
@implementation GiGaFeedLeiIingViewCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
}
|
||||
|
||||
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
||||
[super setSelected:selected animated:animated];
|
||||
|
||||
// Configure the view for the selected state
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="GiGaFeedLeiIingViewCell" id="KGk-i7-Jjw" customClass="GiGaFeedLeiIingViewCell">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="43.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="amZ-ba-Om2">
|
||||
<rect key="frame" x="15" y="0.0" width="290" height="44"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="bg_moreandmore_red" translatesAutoresizingMaskIntoConstraints="NO" id="hQC-14-kEw">
|
||||
<rect key="frame" x="275" y="15" width="9" height="14"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="9" id="SAd-5C-zb8"/>
|
||||
<constraint firstAttribute="height" constant="14" id="agY-nO-dFa"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="选择反馈类型" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6lu-rs-JV8">
|
||||
<rect key="frame" x="14" y="13" width="79" height="19"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="79" id="it2-tZ-9bc"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="13"/>
|
||||
<color key="textColor" red="0.1764705882352941" green="0.1764705882352941" blue="0.1764705882352941" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="hQC-14-kEw" firstAttribute="centerY" secondItem="amZ-ba-Om2" secondAttribute="centerY" id="NBv-tA-YHO"/>
|
||||
<constraint firstItem="6lu-rs-JV8" firstAttribute="centerY" secondItem="amZ-ba-Om2" secondAttribute="centerY" id="lQi-w4-iGA"/>
|
||||
<constraint firstAttribute="trailing" secondItem="hQC-14-kEw" secondAttribute="trailing" constant="6" id="mlv-BR-iwm"/>
|
||||
<constraint firstItem="6lu-rs-JV8" firstAttribute="leading" secondItem="amZ-ba-Om2" secondAttribute="leading" constant="14" id="uDa-Qt-n2a"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstItem="amZ-ba-Om2" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="S0A-Ug-Uqf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="amZ-ba-Om2" secondAttribute="trailing" constant="15" id="Uom-VJ-ir3"/>
|
||||
<constraint firstItem="amZ-ba-Om2" firstAttribute="height" secondItem="H2p-sc-9uM" secondAttribute="height" id="alS-XN-7dq"/>
|
||||
<constraint firstItem="amZ-ba-Om2" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="tx5-6X-UEP"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<color key="backgroundColor" red="0.51372549019607838" green="0.039215686274509803" blue="0.039215686274509803" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<viewLayoutGuide key="safeArea" id="aW0-zy-SZf"/>
|
||||
<connections>
|
||||
<outlet property="kidLabel" destination="6lu-rs-JV8" id="FX8-d4-4Fj"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-14" y="-13"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="bg_moreandmore_red" width="9" height="14"/>
|
||||
</resources>
|
||||
</document>
|
||||
Reference in New Issue
Block a user