浏览代码

1.音频播放GIF 动画效果

huangxiaodong 1 年之前
父节点
当前提交
54c6087f5b

+ 6 - 0
创维盒子/双子星云手机.xcodeproj/project.pbxproj

@@ -772,6 +772,8 @@
 		6BA08F5A2C01D05B00A2242D /* CWUploadTask+CheckInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA08F442C01D05B00A2242D /* CWUploadTask+CheckInfo.m */; };
 		6BA533382B16E65500D1CB5C /* TvStatusModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA533362B16E65500D1CB5C /* TvStatusModel.h */; };
 		6BA533392B16E65500D1CB5C /* TvStatusModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA533372B16E65500D1CB5C /* TvStatusModel.m */; };
+		6BB852282C4F7FE600570BF6 /* playingAudioGif.gif in Resources */ = {isa = PBXBuildFile; fileRef = 6BB852272C4F7FE500570BF6 /* playingAudioGif.gif */; };
+		6BB852292C4F7FE600570BF6 /* playingAudioGif.gif in Resources */ = {isa = PBXBuildFile; fileRef = 6BB852272C4F7FE500570BF6 /* playingAudioGif.gif */; };
 		6BBB35D92AE7645200E4A59B /* RunInBackground.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 6BBB35D62AE7645200E4A59B /* RunInBackground.mp3 */; };
 		6BBB35DD2AE76AD800E4A59B /* AudioSessionObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BBB35DB2AE76AD800E4A59B /* AudioSessionObject.h */; };
 		6BBB35DE2AE76AD800E4A59B /* AudioSessionObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BBB35DC2AE76AD800E4A59B /* AudioSessionObject.m */; };
@@ -1902,6 +1904,7 @@
 		6BA08F442C01D05B00A2242D /* CWUploadTask+CheckInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "CWUploadTask+CheckInfo.m"; sourceTree = "<group>"; };
 		6BA533362B16E65500D1CB5C /* TvStatusModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TvStatusModel.h; sourceTree = "<group>"; };
 		6BA533372B16E65500D1CB5C /* TvStatusModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TvStatusModel.m; sourceTree = "<group>"; };
+		6BB852272C4F7FE500570BF6 /* playingAudioGif.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = playingAudioGif.gif; sourceTree = "<group>"; };
 		6BBB35D62AE7645200E4A59B /* RunInBackground.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = RunInBackground.mp3; sourceTree = "<group>"; };
 		6BBB35DB2AE76AD800E4A59B /* AudioSessionObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AudioSessionObject.h; sourceTree = "<group>"; };
 		6BBB35DC2AE76AD800E4A59B /* AudioSessionObject.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AudioSessionObject.m; sourceTree = "<group>"; };
@@ -3637,6 +3640,7 @@
 				A02FF6AA27D7054700D59D3F /* Info.plist */,
 				6B4835FB2B9172B2001FC9BA /* resources */,
 				A02FF6AB27D7054700D59D3F /* main.m */,
+				6BB852272C4F7FE500570BF6 /* playingAudioGif.gif */,
 				A003F6C427D8423600715CBF /* loadingBlueGif.gif */,
 				A003F6C327D8423600715CBF /* loadingWhiteGif.gif */,
 				18438BE82A04B3AB00981C34 /* Localizable.strings */,
@@ -4393,6 +4397,7 @@
 				6BD507FA2B9576A4006E7CB0 /* LICENSE in Resources */,
 				6BD507FB2B9576A4006E7CB0 /* LICENSE_jsonmodel.txt in Resources */,
 				6BD507FC2B9576A4006E7CB0 /* HWPageViewController.xib in Resources */,
+				6BB852292C4F7FE600570BF6 /* playingAudioGif.gif in Resources */,
 				6BD507FD2B9576A4006E7CB0 /* HWPageListCell.xib in Resources */,
 				6BD507FF2B9576A4006E7CB0 /* HWHomeListCell.xib in Resources */,
 				6BD508002B9576A4006E7CB0 /* HWToolListCell.xib in Resources */,
@@ -4429,6 +4434,7 @@
 				183AE64A2A8A2CF000B11CB0 /* LICENSE in Resources */,
 				183AE5FF2A89CE3C00B11CB0 /* LICENSE_jsonmodel.txt in Resources */,
 				A08A94DC27E97DB800C544BB /* HWPageViewController.xib in Resources */,
+				6BB852282C4F7FE600570BF6 /* playingAudioGif.gif in Resources */,
 				A08A94E127E9837600C544BB /* HWPageListCell.xib in Resources */,
 				A084D69927E8657800054880 /* HWHomeListCell.xib in Resources */,
 				A084D68F27E859D300054880 /* HWToolListCell.xib in Resources */,

+ 1 - 1
创维盒子/双子星云手机/AppDelegate/SceneDelegate.m

@@ -411,7 +411,7 @@
 //    tabBarController.tabBar.tintColor = [UIColor hwColor:@"#01B7EA"]; // 设置选中标签项的颜色
     tabBarController.tabBar.backgroundColor = [UIColor whiteColor];
 
-    [[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor hwColor:@"#F6F8FA"],NSForegroundColorAttributeName, [UIFont systemFontOfSize:12.0],NSFontAttributeName,nil] forState:UIControlStateNormal];
+    [[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor hwColor:@"#7C8196"],NSForegroundColorAttributeName, [UIFont systemFontOfSize:12.0],NSFontAttributeName,nil] forState:UIControlStateNormal];
 
     [[UITabBarItem appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:[UIColor hwColor:@"#01B7EA"],NSForegroundColorAttributeName, [UIFont systemFontOfSize:12.0],NSFontAttributeName,nil] forState:UIControlStateSelected];
     

二进制
创维盒子/双子星云手机/Assets.xcassets/mine/mine_head_icon.imageset/mine_head_icon@2x.png


二进制
创维盒子/双子星云手机/Assets.xcassets/mine/mine_head_icon.imageset/mine_head_icon@3x.png


+ 23 - 0
创维盒子/双子星云手机/Class/Set/previewFile/view/audioPlayListViewCell.m

@@ -6,6 +6,12 @@
 //
 
 #import "audioPlayListViewCell.h"
+#import "FLAnimatedImage.h"
+
+@interface audioPlayListViewCell ()
+@property(nonatomic, strong) FLAnimatedImageView *playingGifView;
+
+@end
 
 @implementation audioPlayListViewCell
 
@@ -109,6 +115,21 @@
         make.top.equalTo(_titleLabel.mas_bottom).offset(5.0);
     }];
     
+    
+    FLAnimatedImage *image = [FLAnimatedImage animatedImageWithGIFData:[NSData dataWithContentsOfURL:[[NSBundle mainBundle] URLForResource:@"playingAudioGif" withExtension:@"gif"]]];
+    
+    _playingGifView =  [[FLAnimatedImageView alloc] init];
+    [_playingGifView setContentMode:UIViewContentModeScaleAspectFill];
+    [_playingGifView setBackgroundColor:[ UIColor clearColor]];
+    _playingGifView.animatedImage = image;
+    [_cellBgView addSubview:_playingGifView];
+
+    [_playingGifView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.mas_equalTo(_checkButton.mas_centerX);
+        make.centerY.mas_equalTo(_checkButton.mas_centerY);
+        make.width.mas_equalTo(40);
+        make.height.mas_equalTo(40);
+    }];
 }
 
 
@@ -172,11 +193,13 @@
 {
     if(isPlayingType){
         _checkButton.hidden = YES;
+        _playingGifView.hidden = NO;
         [_titleLabel setTextColor:[UIColor hwColor:@"#01B7EA"]];
         [_contentLabel setTextColor:[UIColor hwColor:@"#01B7EA"]];
     }
     else{
         _checkButton.hidden = NO;
+        _playingGifView.hidden = YES;
         [_titleLabel setTextColor:HW0A132BColor];
         [_contentLabel setTextColor:HW666666Color];
     }

二进制
创维盒子/双子星云手机/playingAudioGif.gif