Commit ad150219 authored by banchichen's avatar banchichen

修改图片查找路径,修复pod下的TZImagePickerController图片资源找不到的问题

parent 8ddd7b48
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
6DC358661CC8BAFD00898D29 /* TZImagePickerController.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 6DC358651CC8BAFD00898D29 /* TZImagePickerController.bundle */; };
900E65811C2BB8D5003D9A9E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 900E65801C2BB8D5003D9A9E /* main.m */; }; 900E65811C2BB8D5003D9A9E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 900E65801C2BB8D5003D9A9E /* main.m */; };
900E65841C2BB8D5003D9A9E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 900E65831C2BB8D5003D9A9E /* AppDelegate.m */; }; 900E65841C2BB8D5003D9A9E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 900E65831C2BB8D5003D9A9E /* AppDelegate.m */; };
900E65871C2BB8D5003D9A9E /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 900E65861C2BB8D5003D9A9E /* ViewController.m */; }; 900E65871C2BB8D5003D9A9E /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 900E65861C2BB8D5003D9A9E /* ViewController.m */; };
...@@ -22,22 +23,6 @@ ...@@ -22,22 +23,6 @@
900EF0121C2C107400EA709B /* TZPhotoPreviewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 900EF0111C2C107400EA709B /* TZPhotoPreviewController.m */; }; 900EF0121C2C107400EA709B /* TZPhotoPreviewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 900EF0111C2C107400EA709B /* TZPhotoPreviewController.m */; };
900EF0161C2C134900EA709B /* TZPhotoPreviewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 900EF0141C2C134900EA709B /* TZPhotoPreviewCell.m */; }; 900EF0161C2C134900EA709B /* TZPhotoPreviewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 900EF0141C2C134900EA709B /* TZPhotoPreviewCell.m */; };
9038D5911C3974F0007DE549 /* TZTestCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9038D5901C3974F0007DE549 /* TZTestCell.m */; }; 9038D5911C3974F0007DE549 /* TZTestCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9038D5901C3974F0007DE549 /* TZTestCell.m */; };
905467BD1C425BBC00793338 /* MMVideoPreviewPlay@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 905467AD1C425BBC00793338 /* MMVideoPreviewPlay@2x.png */; };
905467BE1C425BBC00793338 /* MMVideoPreviewPlayHL@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 905467AE1C425BBC00793338 /* MMVideoPreviewPlayHL@2x.png */; };
905467BF1C425BBC00793338 /* navi_back@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 905467AF1C425BBC00793338 /* navi_back@2x.png */; };
905467C01C425BBC00793338 /* photo_def_photoPickerVc@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 905467B01C425BBC00793338 /* photo_def_photoPickerVc@2x.png */; };
905467C11C425BBC00793338 /* photo_def_previewVc@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 905467B11C425BBC00793338 /* photo_def_previewVc@2x.png */; };
905467C21C425BBC00793338 /* photo_number_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 905467B21C425BBC00793338 /* photo_number_icon@2x.png */; };
905467C31C425BBC00793338 /* photo_original_def@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 905467B31C425BBC00793338 /* photo_original_def@2x.png */; };
905467C41C425BBC00793338 /* photo_original_sel@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 905467B41C425BBC00793338 /* photo_original_sel@2x.png */; };
905467C51C425BBC00793338 /* photo_sel_photoPickerVc@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 905467B51C425BBC00793338 /* photo_sel_photoPickerVc@2x.png */; };
905467C61C425BBC00793338 /* photo_sel_previewVc@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 905467B61C425BBC00793338 /* photo_sel_previewVc@2x.png */; };
905467C71C425BBC00793338 /* preview_number_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 905467B71C425BBC00793338 /* preview_number_icon@2x.png */; };
905467C81C425BBC00793338 /* preview_original_def@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 905467B81C425BBC00793338 /* preview_original_def@2x.png */; };
905467C91C425BBC00793338 /* TableViewArrow@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 905467B91C425BBC00793338 /* TableViewArrow@2x.png */; };
905467CA1C425BBC00793338 /* TZAlbumCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 905467BA1C425BBC00793338 /* TZAlbumCell.xib */; };
905467CB1C425BBC00793338 /* TZAssetCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 905467BB1C425BBC00793338 /* TZAssetCell.xib */; };
905467CC1C425BBC00793338 /* VideoSendIcon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 905467BC1C425BBC00793338 /* VideoSendIcon@2x.png */; };
90CE84AE1C3A89EF003D0779 /* TZImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 90CE84AD1C3A89EF003D0779 /* TZImageManager.m */; }; 90CE84AE1C3A89EF003D0779 /* TZImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 90CE84AD1C3A89EF003D0779 /* TZImageManager.m */; };
90CE84B71C3BABB6003D0779 /* TZVideoPlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 90CE84B61C3BABB6003D0779 /* TZVideoPlayerController.m */; }; 90CE84B71C3BABB6003D0779 /* TZVideoPlayerController.m in Sources */ = {isa = PBXBuildFile; fileRef = 90CE84B61C3BABB6003D0779 /* TZVideoPlayerController.m */; };
90EBF5D61C2E298000CB9BCC /* UIView+Layout.m in Sources */ = {isa = PBXBuildFile; fileRef = 90EBF5D51C2E298000CB9BCC /* UIView+Layout.m */; }; 90EBF5D61C2E298000CB9BCC /* UIView+Layout.m in Sources */ = {isa = PBXBuildFile; fileRef = 90EBF5D51C2E298000CB9BCC /* UIView+Layout.m */; };
...@@ -61,6 +46,7 @@ ...@@ -61,6 +46,7 @@
/* End PBXContainerItemProxy section */ /* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
6DC358651CC8BAFD00898D29 /* TZImagePickerController.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = TZImagePickerController.bundle; sourceTree = "<group>"; };
900E657C1C2BB8D5003D9A9E /* TZImagePickerController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TZImagePickerController.app; sourceTree = BUILT_PRODUCTS_DIR; }; 900E657C1C2BB8D5003D9A9E /* TZImagePickerController.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TZImagePickerController.app; sourceTree = BUILT_PRODUCTS_DIR; };
900E65801C2BB8D5003D9A9E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 900E65801C2BB8D5003D9A9E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
900E65821C2BB8D5003D9A9E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; 900E65821C2BB8D5003D9A9E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
...@@ -91,22 +77,6 @@ ...@@ -91,22 +77,6 @@
900EF0141C2C134900EA709B /* TZPhotoPreviewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TZPhotoPreviewCell.m; sourceTree = "<group>"; }; 900EF0141C2C134900EA709B /* TZPhotoPreviewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TZPhotoPreviewCell.m; sourceTree = "<group>"; };
9038D58F1C3974F0007DE549 /* TZTestCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZTestCell.h; sourceTree = "<group>"; }; 9038D58F1C3974F0007DE549 /* TZTestCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZTestCell.h; sourceTree = "<group>"; };
9038D5901C3974F0007DE549 /* TZTestCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TZTestCell.m; sourceTree = "<group>"; }; 9038D5901C3974F0007DE549 /* TZTestCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TZTestCell.m; sourceTree = "<group>"; };
905467AD1C425BBC00793338 /* MMVideoPreviewPlay@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MMVideoPreviewPlay@2x.png"; sourceTree = "<group>"; };
905467AE1C425BBC00793338 /* MMVideoPreviewPlayHL@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "MMVideoPreviewPlayHL@2x.png"; sourceTree = "<group>"; };
905467AF1C425BBC00793338 /* navi_back@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "navi_back@2x.png"; sourceTree = "<group>"; };
905467B01C425BBC00793338 /* photo_def_photoPickerVc@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "photo_def_photoPickerVc@2x.png"; sourceTree = "<group>"; };
905467B11C425BBC00793338 /* photo_def_previewVc@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "photo_def_previewVc@2x.png"; sourceTree = "<group>"; };
905467B21C425BBC00793338 /* photo_number_icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "photo_number_icon@2x.png"; sourceTree = "<group>"; };
905467B31C425BBC00793338 /* photo_original_def@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "photo_original_def@2x.png"; sourceTree = "<group>"; };
905467B41C425BBC00793338 /* photo_original_sel@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "photo_original_sel@2x.png"; sourceTree = "<group>"; };
905467B51C425BBC00793338 /* photo_sel_photoPickerVc@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "photo_sel_photoPickerVc@2x.png"; sourceTree = "<group>"; };
905467B61C425BBC00793338 /* photo_sel_previewVc@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "photo_sel_previewVc@2x.png"; sourceTree = "<group>"; };
905467B71C425BBC00793338 /* preview_number_icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "preview_number_icon@2x.png"; sourceTree = "<group>"; };
905467B81C425BBC00793338 /* preview_original_def@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "preview_original_def@2x.png"; sourceTree = "<group>"; };
905467B91C425BBC00793338 /* TableViewArrow@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "TableViewArrow@2x.png"; sourceTree = "<group>"; };
905467BA1C425BBC00793338 /* TZAlbumCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TZAlbumCell.xib; sourceTree = "<group>"; };
905467BB1C425BBC00793338 /* TZAssetCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TZAssetCell.xib; sourceTree = "<group>"; };
905467BC1C425BBC00793338 /* VideoSendIcon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "VideoSendIcon@2x.png"; sourceTree = "<group>"; };
90CE84AC1C3A89EF003D0779 /* TZImageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZImageManager.h; sourceTree = "<group>"; }; 90CE84AC1C3A89EF003D0779 /* TZImageManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZImageManager.h; sourceTree = "<group>"; };
90CE84AD1C3A89EF003D0779 /* TZImageManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TZImageManager.m; sourceTree = "<group>"; }; 90CE84AD1C3A89EF003D0779 /* TZImageManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TZImageManager.m; sourceTree = "<group>"; };
90CE84B51C3BABB6003D0779 /* TZVideoPlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZVideoPlayerController.h; sourceTree = "<group>"; }; 90CE84B51C3BABB6003D0779 /* TZVideoPlayerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZVideoPlayerController.h; sourceTree = "<group>"; };
...@@ -140,6 +110,14 @@ ...@@ -140,6 +110,14 @@
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */ /* Begin PBXGroup section */
6DC358641CC8BAE300898D29 /* Resources */ = {
isa = PBXGroup;
children = (
6DC358651CC8BAFD00898D29 /* TZImagePickerController.bundle */,
);
name = Resources;
sourceTree = "<group>";
};
900E65731C2BB8D5003D9A9E = { 900E65731C2BB8D5003D9A9E = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -226,34 +204,11 @@ ...@@ -226,34 +204,11 @@
90CE84B61C3BABB6003D0779 /* TZVideoPlayerController.m */, 90CE84B61C3BABB6003D0779 /* TZVideoPlayerController.m */,
90EBF5D41C2E298000CB9BCC /* UIView+Layout.h */, 90EBF5D41C2E298000CB9BCC /* UIView+Layout.h */,
90EBF5D51C2E298000CB9BCC /* UIView+Layout.m */, 90EBF5D51C2E298000CB9BCC /* UIView+Layout.m */,
905467AC1C425BBC00793338 /* Resource */, 6DC358641CC8BAE300898D29 /* Resources */,
); );
path = TZImagePickerController; path = TZImagePickerController;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
905467AC1C425BBC00793338 /* Resource */ = {
isa = PBXGroup;
children = (
905467AD1C425BBC00793338 /* MMVideoPreviewPlay@2x.png */,
905467AE1C425BBC00793338 /* MMVideoPreviewPlayHL@2x.png */,
905467AF1C425BBC00793338 /* navi_back@2x.png */,
905467B01C425BBC00793338 /* photo_def_photoPickerVc@2x.png */,
905467B11C425BBC00793338 /* photo_def_previewVc@2x.png */,
905467B21C425BBC00793338 /* photo_number_icon@2x.png */,
905467B31C425BBC00793338 /* photo_original_def@2x.png */,
905467B41C425BBC00793338 /* photo_original_sel@2x.png */,
905467B51C425BBC00793338 /* photo_sel_photoPickerVc@2x.png */,
905467B61C425BBC00793338 /* photo_sel_previewVc@2x.png */,
905467B71C425BBC00793338 /* preview_number_icon@2x.png */,
905467B81C425BBC00793338 /* preview_original_def@2x.png */,
905467B91C425BBC00793338 /* TableViewArrow@2x.png */,
905467BA1C425BBC00793338 /* TZAlbumCell.xib */,
905467BB1C425BBC00793338 /* TZAssetCell.xib */,
905467BC1C425BBC00793338 /* VideoSendIcon@2x.png */,
);
path = Resource;
sourceTree = "<group>";
};
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXNativeTarget section */ /* Begin PBXNativeTarget section */
...@@ -357,25 +312,10 @@ ...@@ -357,25 +312,10 @@
isa = PBXResourcesBuildPhase; isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
905467C91C425BBC00793338 /* TableViewArrow@2x.png in Resources */,
905467C31C425BBC00793338 /* photo_original_def@2x.png in Resources */,
905467C41C425BBC00793338 /* photo_original_sel@2x.png in Resources */,
905467BE1C425BBC00793338 /* MMVideoPreviewPlayHL@2x.png in Resources */,
905467C21C425BBC00793338 /* photo_number_icon@2x.png in Resources */,
905467C11C425BBC00793338 /* photo_def_previewVc@2x.png in Resources */,
905467C01C425BBC00793338 /* photo_def_photoPickerVc@2x.png in Resources */,
900E658F1C2BB8D5003D9A9E /* LaunchScreen.storyboard in Resources */, 900E658F1C2BB8D5003D9A9E /* LaunchScreen.storyboard in Resources */,
6DC358661CC8BAFD00898D29 /* TZImagePickerController.bundle in Resources */,
900E658C1C2BB8D5003D9A9E /* Assets.xcassets in Resources */, 900E658C1C2BB8D5003D9A9E /* Assets.xcassets in Resources */,
905467CA1C425BBC00793338 /* TZAlbumCell.xib in Resources */,
905467C51C425BBC00793338 /* photo_sel_photoPickerVc@2x.png in Resources */,
905467BF1C425BBC00793338 /* navi_back@2x.png in Resources */,
900E658A1C2BB8D5003D9A9E /* Main.storyboard in Resources */, 900E658A1C2BB8D5003D9A9E /* Main.storyboard in Resources */,
905467BD1C425BBC00793338 /* MMVideoPreviewPlay@2x.png in Resources */,
905467CB1C425BBC00793338 /* TZAssetCell.xib in Resources */,
905467C61C425BBC00793338 /* photo_sel_previewVc@2x.png in Resources */,
905467C81C425BBC00793338 /* preview_original_def@2x.png in Resources */,
905467C71C425BBC00793338 /* preview_number_icon@2x.png in Resources */,
905467CC1C425BBC00793338 /* VideoSendIcon@2x.png in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
self.imageView.image = photo; self.imageView.image = photo;
}]; }];
self.selectPhotoButton.selected = model.isSelected; self.selectPhotoButton.selected = model.isSelected;
self.selectImageView.image = self.selectPhotoButton.isSelected ? [UIImage imageNamed:@"photo_sel_photoPickerVc"] : [UIImage imageNamed:@"photo_def_photoPickerVc"]; self.selectImageView.image = self.selectPhotoButton.isSelected ? [UIImage imageNamed:TZImagePickerSrcName(@"photo_sel_photoPickerVc.png")] : [UIImage imageNamed:TZImagePickerSrcName(@"photo_def_photoPickerVc.png")];
self.type = TZAssetCellTypePhoto; self.type = TZAssetCellTypePhoto;
if (model.type == TZAssetModelMediaTypeLivePhoto) self.type = TZAssetCellTypeLivePhoto; if (model.type == TZAssetModelMediaTypeLivePhoto) self.type = TZAssetCellTypeLivePhoto;
else if (model.type == TZAssetModelMediaTypeAudio) self.type = TZAssetCellTypeAudio; else if (model.type == TZAssetModelMediaTypeAudio) self.type = TZAssetCellTypeAudio;
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
if (self.didSelectPhotoBlock) { if (self.didSelectPhotoBlock) {
self.didSelectPhotoBlock(sender.isSelected); self.didSelectPhotoBlock(sender.isSelected);
} }
self.selectImageView.image = sender.isSelected ? [UIImage imageNamed:@"photo_sel_photoPickerVc"] : [UIImage imageNamed:@"photo_def_photoPickerVc"]; self.selectImageView.image = sender.isSelected ? [UIImage imageNamed:TZImagePickerSrcName(@"photo_sel_photoPickerVc.png")] : [UIImage imageNamed:TZImagePickerSrcName(@"photo_def_photoPickerVc.png")];
if (sender.isSelected) { if (sender.isSelected) {
[UIView showOscillatoryAnimationWithLayer:_selectImageView.layer type:TZOscillatoryAnimationToBigger]; [UIView showOscillatoryAnimationWithLayer:_selectImageView.layer type:TZOscillatoryAnimationToBigger];
} }
...@@ -123,7 +123,7 @@ ...@@ -123,7 +123,7 @@
if (_viewImgView == nil) { if (_viewImgView == nil) {
UIImageView *viewImgView = [[UIImageView alloc] init]; UIImageView *viewImgView = [[UIImageView alloc] init];
viewImgView.frame = CGRectMake(8, 0, 17, 17); viewImgView.frame = CGRectMake(8, 0, 17, 17);
[viewImgView setImage:[UIImage imageNamed:@"VideoSendIcon"]]; [viewImgView setImage:[UIImage imageNamed:TZImagePickerSrcName(@"VideoSendIcon.png")]];
[self.bottomView addSubview:viewImgView]; [self.bottomView addSubview:viewImgView];
_viewImgView = viewImgView; _viewImgView = viewImgView;
} }
...@@ -212,7 +212,7 @@ ...@@ -212,7 +212,7 @@
UIImageView *arrowImageView = [[UIImageView alloc] init]; UIImageView *arrowImageView = [[UIImageView alloc] init];
CGFloat arrowWH = 15; CGFloat arrowWH = 15;
arrowImageView.frame = CGRectMake(self.tz_width - arrowWH - 12, 28, arrowWH, arrowWH); arrowImageView.frame = CGRectMake(self.tz_width - arrowWH - 12, 28, arrowWH, arrowWH);
[arrowImageView setImage:[UIImage imageNamed:@"TableViewArrow"]]; [arrowImageView setImage:[UIImage imageNamed:TZImagePickerSrcName(@"TableViewArrow.png")]];
[self.contentView addSubview:arrowImageView]; [self.contentView addSubview:arrowImageView];
_arrowImageView = arrowImageView; _arrowImageView = arrowImageView;
} }
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>StringsTable</key>
<string>Root</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>Group</string>
</dict>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string>Name</string>
<key>Key</key>
<string>name_preference</string>
<key>DefaultValue</key>
<string></string>
<key>IsSecure</key>
<false/>
<key>KeyboardType</key>
<string>Alphabet</string>
<key>AutocapitalizationType</key>
<string>None</string>
<key>AutocorrectionType</key>
<string>No</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Enabled</string>
<key>Key</key>
<string>enabled_preference</string>
<key>DefaultValue</key>
<true/>
</dict>
<dict>
<key>Type</key>
<string>PSSliderSpecifier</string>
<key>Key</key>
<string>slider_preference</string>
<key>DefaultValue</key>
<real>0.5</real>
<key>MinimumValue</key>
<integer>0</integer>
<key>MaximumValue</key>
<integer>1</integer>
<key>MinimumValueImage</key>
<string></string>
<key>MaximumValueImage</key>
<string></string>
</dict>
</array>
</dict>
</plist>
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
/* /*
经过测试,比起xib的方式,把TZAssetCell改用纯代码的方式来写,滑动帧数明显提高了(约提高10帧左右) 经过测试,比起xib的方式,把TZAssetCell改用纯代码的方式来写,滑动帧数明显提高了(约提高10帧左右)
最初发现这个问题并修复的是@小鱼周凌宇同学,她的博客地址,http://www.cnblogs.com/coderfish/ 最初发现这个问题并修复的是@小鱼周凌宇同学,她的博客地址: http://zhoulingyu.com/
表示感谢~ 表示感谢~
原来xib确实会导致性能问题啊...大家也要注意了... 原来xib确实会导致性能问题啊...大家也要注意了...
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#define iOS8Later ([UIDevice currentDevice].systemVersion.floatValue >= 8.0f) #define iOS8Later ([UIDevice currentDevice].systemVersion.floatValue >= 8.0f)
#define iOS9Later ([UIDevice currentDevice].systemVersion.floatValue >= 9.0f) #define iOS9Later ([UIDevice currentDevice].systemVersion.floatValue >= 9.0f)
#define iOS9_1Later ([UIDevice currentDevice].systemVersion.floatValue >= 9.1f) #define iOS9_1Later ([UIDevice currentDevice].systemVersion.floatValue >= 9.1f)
// 图片路径
#define TZImagePickerSrcName(file) [@"TZImagePickerController.bundle" stringByAppendingPathComponent:file]
@protocol TZImagePickerControllerDelegate; @protocol TZImagePickerControllerDelegate;
@interface TZImagePickerController : UINavigationController @interface TZImagePickerController : UINavigationController
...@@ -96,3 +98,4 @@ ...@@ -96,3 +98,4 @@
@interface TZAlbumPickerController : UIViewController @interface TZAlbumPickerController : UIViewController
@end @end
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
if (self.childViewControllers.count > 0) { if (self.childViewControllers.count > 0) {
UIButton *backButton = [[UIButton alloc] initWithFrame:CGRectMake(3, 0, 50, 44)]; UIButton *backButton = [[UIButton alloc] initWithFrame:CGRectMake(3, 0, 50, 44)];
[backButton setImage:[UIImage imageNamed:@"navi_back"] forState:UIControlStateNormal]; [backButton setImage:[UIImage imageNamed:TZImagePickerSrcName(@"navi_back.png")] forState:UIControlStateNormal];
backButton.imageEdgeInsets = UIEdgeInsetsMake(0, -5, 0, 0); backButton.imageEdgeInsets = UIEdgeInsetsMake(0, -5, 0, 0);
[backButton setTitle:@"返回" forState:UIControlStateNormal]; [backButton setTitle:@"返回" forState:UIControlStateNormal];
backButton.titleLabel.font = [UIFont systemFontOfSize:15]; backButton.titleLabel.font = [UIFont systemFontOfSize:15];
......
...@@ -124,8 +124,8 @@ static CGSize AssetGridThumbnailSize; ...@@ -124,8 +124,8 @@ static CGSize AssetGridThumbnailSize;
[_originalPhotoButton setTitle:@"原图" forState:UIControlStateSelected]; [_originalPhotoButton setTitle:@"原图" forState:UIControlStateSelected];
[_originalPhotoButton setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal]; [_originalPhotoButton setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
[_originalPhotoButton setTitleColor:[UIColor blackColor] forState:UIControlStateSelected]; [_originalPhotoButton setTitleColor:[UIColor blackColor] forState:UIControlStateSelected];
[_originalPhotoButton setImage:[UIImage imageNamed:@"photo_original_def"] forState:UIControlStateNormal]; [_originalPhotoButton setImage:[UIImage imageNamed:TZImagePickerSrcName(@"photo_original_def.png")] forState:UIControlStateNormal];
[_originalPhotoButton setImage:[UIImage imageNamed:@"photo_original_sel"] forState:UIControlStateSelected]; [_originalPhotoButton setImage:[UIImage imageNamed:TZImagePickerSrcName(@"photo_original_sel.png")] forState:UIControlStateSelected];
_originalPhotoButton.enabled = _selectedPhotoArr.count > 0; _originalPhotoButton.enabled = _selectedPhotoArr.count > 0;
_originalPhotoLable = [[UILabel alloc] init]; _originalPhotoLable = [[UILabel alloc] init];
...@@ -146,7 +146,7 @@ static CGSize AssetGridThumbnailSize; ...@@ -146,7 +146,7 @@ static CGSize AssetGridThumbnailSize;
[_okButton setTitleColor:imagePickerVc.oKButtonTitleColorDisabled forState:UIControlStateDisabled]; [_okButton setTitleColor:imagePickerVc.oKButtonTitleColorDisabled forState:UIControlStateDisabled];
_okButton.enabled = NO; _okButton.enabled = NO;
_numberImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"photo_number_icon"]]; _numberImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:TZImagePickerSrcName(@"photo_number_icon.png")]];
_numberImageView.frame = CGRectMake(self.view.tz_width - 56 - 24, 12, 26, 26); _numberImageView.frame = CGRectMake(self.view.tz_width - 56 - 24, 12, 26, 26);
_numberImageView.hidden = _selectedPhotoArr.count <= 0; _numberImageView.hidden = _selectedPhotoArr.count <= 0;
_numberImageView.backgroundColor = [UIColor clearColor]; _numberImageView.backgroundColor = [UIColor clearColor];
......
...@@ -65,13 +65,13 @@ ...@@ -65,13 +65,13 @@
_naviBar.alpha = 0.7; _naviBar.alpha = 0.7;
_backButton = [[UIButton alloc] initWithFrame:CGRectMake(10, 10, 44, 44)]; _backButton = [[UIButton alloc] initWithFrame:CGRectMake(10, 10, 44, 44)];
[_backButton setImage:[UIImage imageNamed:@"navi_back"] forState:UIControlStateNormal]; [_backButton setImage:[UIImage imageNamed:TZImagePickerSrcName(@"navi_back.png")] forState:UIControlStateNormal];
[_backButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [_backButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[_backButton addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside]; [_backButton addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];
_selectButton = [[UIButton alloc] initWithFrame:CGRectMake(self.view.tz_width - 54, 10, 42, 42)]; _selectButton = [[UIButton alloc] initWithFrame:CGRectMake(self.view.tz_width - 54, 10, 42, 42)];
[_selectButton setImage:[UIImage imageNamed:@"photo_def_photoPickerVc"] forState:UIControlStateNormal]; [_selectButton setImage:[UIImage imageNamed:TZImagePickerSrcName(@"photo_def_photoPickerVc.png")] forState:UIControlStateNormal];
[_selectButton setImage:[UIImage imageNamed:@"photo_sel_photoPickerVc"] forState:UIControlStateSelected]; [_selectButton setImage:[UIImage imageNamed:TZImagePickerSrcName(@"photo_sel_photoPickerVc.png")] forState:UIControlStateSelected];
[_selectButton addTarget:self action:@selector(select:) forControlEvents:UIControlEventTouchUpInside]; [_selectButton addTarget:self action:@selector(select:) forControlEvents:UIControlEventTouchUpInside];
[_naviBar addSubview:_selectButton]; [_naviBar addSubview:_selectButton];
...@@ -98,8 +98,8 @@ ...@@ -98,8 +98,8 @@
[_originalPhotoButton setTitle:@"原图" forState:UIControlStateSelected]; [_originalPhotoButton setTitle:@"原图" forState:UIControlStateSelected];
[_originalPhotoButton setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal]; [_originalPhotoButton setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
[_originalPhotoButton setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected]; [_originalPhotoButton setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];
[_originalPhotoButton setImage:[UIImage imageNamed:@"preview_original_def"] forState:UIControlStateNormal]; [_originalPhotoButton setImage:[UIImage imageNamed:TZImagePickerSrcName(@"preview_original_def.png")] forState:UIControlStateNormal];
[_originalPhotoButton setImage:[UIImage imageNamed:@"photo_original_sel"] forState:UIControlStateSelected]; [_originalPhotoButton setImage:[UIImage imageNamed:TZImagePickerSrcName(@"photo_original_sel.png")] forState:UIControlStateSelected];
_originalPhotoLable = [[UILabel alloc] init]; _originalPhotoLable = [[UILabel alloc] init];
_originalPhotoLable.frame = CGRectMake(60, 0, 70, 44); _originalPhotoLable.frame = CGRectMake(60, 0, 70, 44);
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
[_okButton setTitle:@"确定" forState:UIControlStateNormal]; [_okButton setTitle:@"确定" forState:UIControlStateNormal];
[_okButton setTitleColor:imagePickerVc.oKButtonTitleColorNormal forState:UIControlStateNormal]; [_okButton setTitleColor:imagePickerVc.oKButtonTitleColorNormal forState:UIControlStateNormal];
_numberImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"photo_number_icon"]]; _numberImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:TZImagePickerSrcName(@"photo_number_icon.png")]];
_numberImageView.backgroundColor = [UIColor clearColor]; _numberImageView.backgroundColor = [UIColor clearColor];
_numberImageView.frame = CGRectMake(self.view.tz_width - 56 - 24, 9, 26, 26); _numberImageView.frame = CGRectMake(self.view.tz_width - 56 - 24, 9, 26, 26);
_numberImageView.hidden = _selectedPhotoArr.count <= 0; _numberImageView.hidden = _selectedPhotoArr.count <= 0;
......
...@@ -68,8 +68,8 @@ ...@@ -68,8 +68,8 @@
- (void)configPlayButton { - (void)configPlayButton {
_playButton = [UIButton buttonWithType:UIButtonTypeCustom]; _playButton = [UIButton buttonWithType:UIButtonTypeCustom];
_playButton.frame = CGRectMake(0, 64, self.view.tz_width, self.view.tz_height - 64 - 44); _playButton.frame = CGRectMake(0, 64, self.view.tz_width, self.view.tz_height - 64 - 44);
[_playButton setImage:[UIImage imageNamed:@"MMVideoPreviewPlay"] forState:UIControlStateNormal]; [_playButton setImage:[UIImage imageNamed:TZImagePickerSrcName(@"MMVideoPreviewPlay.png")] forState:UIControlStateNormal];
[_playButton setImage:[UIImage imageNamed:@"MMVideoPreviewPlayHL"] forState:UIControlStateHighlighted]; [_playButton setImage:[UIImage imageNamed:TZImagePickerSrcName(@"MMVideoPreviewPlayHL.png")] forState:UIControlStateHighlighted];
[_playButton addTarget:self action:@selector(playButtonClick) forControlEvents:UIControlEventTouchUpInside]; [_playButton addTarget:self action:@selector(playButtonClick) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:_playButton]; [self.view addSubview:_playButton];
} }
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
[_player pause]; [_player pause];
_toolBar.hidden = NO; _toolBar.hidden = NO;
[self.navigationController setNavigationBarHidden:NO]; [self.navigationController setNavigationBarHidden:NO];
[_playButton setImage:[UIImage imageNamed:@"MMVideoPreviewPlay"] forState:UIControlStateNormal]; [_playButton setImage:[UIImage imageNamed:TZImagePickerSrcName(@"MMVideoPreviewPlay.png")] forState:UIControlStateNormal];
if (iOS7Later) [UIApplication sharedApplication].statusBarHidden = NO; if (iOS7Later) [UIApplication sharedApplication].statusBarHidden = NO;
} }
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
TZTestCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"TZTestCell" forIndexPath:indexPath]; TZTestCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"TZTestCell" forIndexPath:indexPath];
if (indexPath.row == _selectedPhotos.count) { if (indexPath.row == _selectedPhotos.count) {
cell.imageView.image = [UIImage imageNamed:@"AlbumAddBtn"]; cell.imageView.image = [UIImage imageNamed:@"AlbumAddBtn.png"];
} else { } else {
cell.imageView.image = _selectedPhotos[indexPath.row]; cell.imageView.image = _selectedPhotos[indexPath.row];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment