├── .gitignore ├── LICENSE ├── QQMusic ├── QQMusic.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── QQMusic │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Classess │ │ ├── Category │ │ │ ├── MJExtension │ │ │ │ ├── CALayer+PauseAimate.h │ │ │ │ ├── CALayer+PauseAimate.m │ │ │ │ ├── MJExtension.h │ │ │ │ ├── MJExtensionConst.h │ │ │ │ ├── MJExtensionConst.m │ │ │ │ ├── MJFoundation.h │ │ │ │ ├── MJFoundation.m │ │ │ │ ├── MJProperty.h │ │ │ │ ├── MJProperty.m │ │ │ │ ├── MJType.h │ │ │ │ ├── MJType.m │ │ │ │ ├── NSObject+MJCoding.h │ │ │ │ ├── NSObject+MJCoding.m │ │ │ │ ├── NSObject+MJKeyValue.h │ │ │ │ ├── NSObject+MJKeyValue.m │ │ │ │ ├── NSObject+MJProperty.h │ │ │ │ ├── NSObject+MJProperty.m │ │ │ │ ├── NSString+MJExtension.h │ │ │ │ └── NSString+MJExtension.m │ │ │ ├── NSString+ZHTime.h │ │ │ └── NSString+ZHTime.m │ │ ├── Controller │ │ │ ├── ZHPlayingViewController.h │ │ │ └── ZHPlayingViewController.m │ │ ├── Model │ │ │ ├── ZHLrcline.h │ │ │ ├── ZHLrcline.m │ │ │ ├── ZHMusic.h │ │ │ └── ZHMusic.m │ │ ├── Other │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Masonry │ │ │ │ ├── MASCompositeConstraint.h │ │ │ │ ├── MASCompositeConstraint.m │ │ │ │ ├── MASConstraint+Private.h │ │ │ │ ├── MASConstraint.h │ │ │ │ ├── MASConstraint.m │ │ │ │ ├── MASConstraintMaker.h │ │ │ │ ├── MASConstraintMaker.m │ │ │ │ ├── MASLayoutConstraint.h │ │ │ │ ├── MASLayoutConstraint.m │ │ │ │ ├── MASUtilities.h │ │ │ │ ├── MASViewAttribute.h │ │ │ │ ├── MASViewAttribute.m │ │ │ │ ├── MASViewConstraint.h │ │ │ │ ├── MASViewConstraint.m │ │ │ │ ├── Masonry.h │ │ │ │ ├── NSArray+MASAdditions.h │ │ │ │ ├── NSArray+MASAdditions.m │ │ │ │ ├── NSArray+MASShorthandAdditions.h │ │ │ │ ├── NSLayoutConstraint+MASDebugAdditions.h │ │ │ │ ├── NSLayoutConstraint+MASDebugAdditions.m │ │ │ │ ├── View+MASAdditions.h │ │ │ │ ├── View+MASAdditions.m │ │ │ │ ├── View+MASShorthandAdditions.h │ │ │ │ ├── ViewController+MASAdditions.h │ │ │ │ └── ViewController+MASAdditions.m │ │ │ └── main.m │ │ ├── Tool │ │ │ ├── ZHAudioTool.h │ │ │ ├── ZHAudioTool.m │ │ │ ├── ZHLrcTool.h │ │ │ ├── ZHLrcTool.m │ │ │ ├── ZHMusicTool.h │ │ │ └── ZHMusicTool.m │ │ └── View │ │ │ ├── ZHLrcCell.h │ │ │ ├── ZHLrcCell.m │ │ │ ├── ZHLrcLabel.h │ │ │ ├── ZHLrcLabel.m │ │ │ ├── ZHLrcView.h │ │ │ └── ZHLrcView.m │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── AppIcon29x29@2x.png │ │ │ ├── AppIcon29x29@3x.png │ │ │ ├── AppIcon40x40@2x.png │ │ │ ├── AppIcon40x40@3x.png │ │ │ ├── AppIcon57x57.png │ │ │ ├── AppIcon57x57@2x.png │ │ │ ├── AppIcon60x60@2x.png │ │ │ ├── AppIcon60x60@3x.png │ │ │ └── Contents.json │ │ ├── Images │ │ │ ├── bb.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── bb@2x.jpg │ │ │ ├── bb_icon.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── bb_icon@2x.jpg │ │ │ ├── dzq.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── dzq@2x.jpg │ │ │ ├── dzq_icon.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── dzq_icon@2x.jpg │ │ │ ├── eason.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── eason@2x.jpg │ │ │ ├── eason_icon.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── eason_icon@2x.jpg │ │ │ ├── jay.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── jay@2x.jpg │ │ │ ├── jay_icon.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── jay_icon@2x.png │ │ │ ├── jj.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── jj@2x.jpg │ │ │ ├── jj_icon.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── jj_icon@2x.png │ │ │ ├── kzxd.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── kzxd@2x.jpg │ │ │ ├── kzxd_icon.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── kzxd_icon@2x.jpg │ │ │ ├── lkq.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── lkq@2x.jpg │ │ │ ├── lkq_icon.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── lkq_icon@2x.jpg │ │ │ ├── nanquan.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── nanquan@2x.jpg │ │ │ ├── nanquan_icon.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── nanquan_icon@2x.jpg │ │ │ ├── wf.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── wf@2x.jpg │ │ │ ├── wf_icon.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── wf_icon@2x.jpg │ │ │ ├── zxy.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── zxy@2x.jpg │ │ │ └── zxy_icon.imageset │ │ │ │ ├── Contents.json │ │ │ │ └── zxy_icon@2x.jpg │ │ ├── LaunchImage.launchimage │ │ │ ├── Contents.json │ │ │ ├── Default-568h@2x.png │ │ │ ├── Default-iphone6@2x.png │ │ │ ├── Default-iphone6plus@3x.png │ │ │ ├── Default.png │ │ │ └── Default@2x.png │ │ └── 播放界面 │ │ │ ├── main_tab_more.imageset │ │ │ ├── Contents.json │ │ │ └── main_tab_more@2x.png │ │ │ ├── main_tab_more_h.imageset │ │ │ ├── Contents.json │ │ │ └── main_tab_more_h@2x.png │ │ │ ├── miniplayer_btn_playlist_close.imageset │ │ │ ├── Contents.json │ │ │ └── miniplayer_btn_playlist_close@2x.png │ │ │ ├── miniplayer_btn_playlist_close_b.imageset │ │ │ ├── Contents.json │ │ │ └── miniplayer_btn_playlist_close_b@2x.png │ │ │ ├── player_btn_next_highlight.imageset │ │ │ ├── Contents.json │ │ │ └── player_btn_next_highlight@2x.png │ │ │ ├── player_btn_next_normal.imageset │ │ │ ├── Contents.json │ │ │ └── player_btn_next_normal@2x.png │ │ │ ├── player_btn_pause_highlight.imageset │ │ │ ├── Contents.json │ │ │ └── player_btn_pause_highlight@2x.png │ │ │ ├── player_btn_pause_normal.imageset │ │ │ ├── Contents.json │ │ │ └── player_btn_pause_normal@2x.png │ │ │ ├── player_btn_play_highlight.imageset │ │ │ ├── Contents.json │ │ │ └── player_btn_play_highlight@2x.png │ │ │ ├── player_btn_play_normal.imageset │ │ │ ├── Contents.json │ │ │ └── player_btn_play_normal@2x.png │ │ │ ├── player_btn_pre_highlight.imageset │ │ │ ├── Contents.json │ │ │ └── player_btn_pre_highlight@2x.png │ │ │ ├── player_btn_pre_normal.imageset │ │ │ ├── Contents.json │ │ │ └── player_btn_pre_normal@2x.png │ │ │ ├── player_slider_playback_thumb.imageset │ │ │ ├── Contents.json │ │ │ └── player_slider_playback_thumb@2x.png │ │ │ ├── playing_translate_lyric_select_h.imageset │ │ │ ├── Contents.json │ │ │ └── playing_translate_lyric_select_h@2x.png │ │ │ └── playing_translate_lyric_select_n.imageset │ │ │ ├── Contents.json │ │ │ └── playing_translate_lyric_select_n@2x.png │ ├── Info.plist │ ├── Main.storyboard │ └── Resources │ │ ├── Images │ │ ├── bb@2x.jpg │ │ ├── bb_icon@2x.jpg │ │ ├── dzq@2x.jpg │ │ ├── dzq_icon@2x.jpg │ │ ├── eason@2x.jpg │ │ ├── eason_icon@2x.jpg │ │ ├── jay@2x.jpg │ │ ├── jay_icon@2x.png │ │ ├── jj@2x.jpg │ │ ├── jj_icon@2x.png │ │ ├── kzxd@2x.jpg │ │ ├── kzxd_icon@2x.jpg │ │ ├── lkq@2x.jpg │ │ ├── lkq_icon@2x.jpg │ │ ├── nanquan@2x.jpg │ │ ├── nanquan_icon@2x.jpg │ │ ├── wf@2x.jpg │ │ ├── wf_icon@2x.jpg │ │ ├── zxy@2x.jpg │ │ └── zxy_icon@2x.jpg │ │ ├── Lrcs │ │ ├── 10405520.lrc │ │ ├── 10736444.lrc │ │ ├── 120125029.lrc │ │ ├── 12309111.lrc │ │ ├── 14945107.lrc │ │ ├── 235319.lrc │ │ ├── 255319.lrc │ │ ├── 309769.lrc │ │ ├── 339744.lrc │ │ └── 月半小夜曲.lrc │ │ ├── MP3s │ │ ├── 10405520.mp3 │ │ ├── 10736444.mp3 │ │ ├── 1201111234.mp3 │ │ ├── 120125029.mp3 │ │ ├── 12309111.mp3 │ │ ├── 14945107.mp3 │ │ ├── 235319.mp3 │ │ ├── 255319.mp3 │ │ ├── 309769.mp3 │ │ └── 339744.mp3 │ │ └── Musics.plist └── QQMusicTests │ ├── Info.plist │ └── QQMusicTests.m └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | #Pods/ 27 | -------------------------------------------------------------------------------- /QQMusic/QQMusic.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/MJExtension/CALayer+PauseAimate.h: -------------------------------------------------------------------------------- 1 | // 2 | // CALayer+PauseAimate.h 3 | // QQ音乐 4 | // 5 | // Created by apple on 15/8/14. 6 | // Copyright (c) 2015年 xiaomage. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CALayer (PauseAimate) 12 | 13 | // 暂停动画 14 | - (void)pauseAnimate; 15 | 16 | // 恢复动画 17 | - (void)resumeAnimate; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/MJExtension/CALayer+PauseAimate.m: -------------------------------------------------------------------------------- 1 | // 2 | // CALayer+PauseAimate.m 3 | // QQ音乐 4 | // 5 | // Created by apple on 15/8/14. 6 | // Copyright (c) 2015年 xiaomage. All rights reserved. 7 | // 8 | 9 | #import "CALayer+PauseAimate.h" 10 | 11 | @implementation CALayer (PauseAimate) 12 | 13 | - (void)pauseAnimate 14 | { 15 | CFTimeInterval pausedTime = [self convertTime:CACurrentMediaTime() fromLayer:nil]; 16 | self.speed = 0.0; 17 | self.timeOffset = pausedTime; 18 | } 19 | 20 | - (void)resumeAnimate 21 | { 22 | CFTimeInterval pausedTime = [self timeOffset]; 23 | self.speed = 1.0; 24 | self.timeOffset = 0.0; 25 | self.beginTime = 0.0; 26 | CFTimeInterval timeSincePause = [self convertTime:CACurrentMediaTime() fromLayer:nil] - pausedTime; 27 | self.beginTime = timeSincePause; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/MJExtension/MJExtension.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJExtension.h 3 | // MJExtension 4 | // 5 | // Created by mj on 14-1-15. 6 | // Copyright (c) 2014年 小码哥. All rights reserved. 7 | // 代码地址:https://github.com/CoderMJLee/MJExtension 8 | // 代码地址:http://code4app.com/ios/%E5%AD%97%E5%85%B8-JSON-%E4%B8%8E%E6%A8%A1%E5%9E%8B%E7%9A%84%E8%BD%AC%E6%8D%A2/5339992a933bf062608b4c57 9 | 10 | #import "NSObject+MJCoding.h" 11 | #import "NSObject+MJProperty.h" 12 | #import "NSObject+MJKeyValue.h" 13 | #import "NSString+MJExtension.h" 14 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/MJExtension/MJExtensionConst.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __MJExtensionConst__H__ 3 | #define __MJExtensionConst__H__ 4 | 5 | #import 6 | 7 | // 过期 8 | #define MJExtensionDeprecated(instead) NS_DEPRECATED(2_0, 2_0, 2_0, 2_0, instead) 9 | 10 | // 构建错误 11 | #define MJExtensionBuildError(error, msg) \ 12 | if (error) *error = [NSError errorWithDomain:msg code:250 userInfo:nil]; 13 | 14 | /** 15 | * 断言 16 | * @param condition 条件 17 | * @param returnValue 返回值 18 | */ 19 | #define MJExtensionAssertError(condition, returnValue, error, msg) \ 20 | if ((condition) == NO) { \ 21 | MJExtensionBuildError(error, msg); \ 22 | return returnValue;\ 23 | } 24 | 25 | #define MJExtensionAssert2(condition, returnValue) \ 26 | if ((condition) == NO) return returnValue; 27 | 28 | /** 29 | * 断言 30 | * @param condition 条件 31 | */ 32 | #define MJExtensionAssert(condition) MJExtensionAssert2(condition, ) 33 | 34 | /** 35 | * 断言 36 | * @param param 参数 37 | * @param returnValue 返回值 38 | */ 39 | #define MJExtensionAssertParamNotNil2(param, returnValue) \ 40 | MJExtensionAssert2((param) != nil, returnValue) 41 | 42 | /** 43 | * 断言 44 | * @param param 参数 45 | */ 46 | #define MJExtensionAssertParamNotNil(param) MJExtensionAssertParamNotNil2(param, ) 47 | 48 | /** 49 | * 打印所有的属性 50 | */ 51 | #define MJLogAllIvars \ 52 | -(NSString *)description \ 53 | { \ 54 | return [self keyValues].description; \ 55 | } 56 | #define MJExtensionLogAllProperties MJLogAllIvars 57 | 58 | /** 59 | * 类型(属性类型) 60 | */ 61 | extern NSString *const MJTypeInt; 62 | extern NSString *const MJTypeShort; 63 | extern NSString *const MJTypeFloat; 64 | extern NSString *const MJTypeDouble; 65 | extern NSString *const MJTypeLong; 66 | extern NSString *const MJTypeLongLong; 67 | extern NSString *const MJTypeChar; 68 | extern NSString *const MJTypeBOOL1; 69 | extern NSString *const MJTypeBOOL2; 70 | extern NSString *const MJTypePointer; 71 | 72 | extern NSString *const MJTypeIvar; 73 | extern NSString *const MJTypeMethod; 74 | extern NSString *const MJTypeBlock; 75 | extern NSString *const MJTypeClass; 76 | extern NSString *const MJTypeSEL; 77 | extern NSString *const MJTypeId; 78 | 79 | #endif -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/MJExtension/MJExtensionConst.m: -------------------------------------------------------------------------------- 1 | #ifndef __MJExtensionConst__M__ 2 | #define __MJExtensionConst__M__ 3 | 4 | #import 5 | 6 | /** 7 | * 成员变量类型(属性类型) 8 | */ 9 | NSString *const MJTypeInt = @"i"; 10 | NSString *const MJTypeShort = @"s"; 11 | NSString *const MJTypeFloat = @"f"; 12 | NSString *const MJTypeDouble = @"d"; 13 | NSString *const MJTypeLong = @"q"; 14 | NSString *const MJTypeChar = @"c"; 15 | NSString *const MJTypeBOOL1 = @"c"; 16 | NSString *const MJTypeBOOL2 = @"b"; 17 | NSString *const MJTypePointer = @"*"; 18 | 19 | NSString *const MJTypeIvar = @"^{objc_ivar=}"; 20 | NSString *const MJTypeMethod = @"^{objc_method=}"; 21 | NSString *const MJTypeBlock = @"@?"; 22 | NSString *const MJTypeClass = @"#"; 23 | NSString *const MJTypeSEL = @":"; 24 | NSString *const MJTypeId = @"@"; 25 | 26 | #endif -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/MJExtension/MJFoundation.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJFoundation.h 3 | // MJExtensionExample 4 | // 5 | // Created by MJ Lee on 14/7/16. 6 | // Copyright (c) 2014年 小码哥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MJFoundation : NSObject 12 | + (BOOL)isClassFromFoundation:(Class)c; 13 | @end 14 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/MJExtension/MJFoundation.m: -------------------------------------------------------------------------------- 1 | // 2 | // MJFoundation.m 3 | // MJExtensionExample 4 | // 5 | // Created by MJ Lee on 14/7/16. 6 | // Copyright (c) 2014年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJFoundation.h" 10 | #import "MJExtensionConst.h" 11 | #import 12 | 13 | static NSSet *_foundationClasses; 14 | 15 | @implementation MJFoundation 16 | 17 | + (NSSet *)foundatonClasses 18 | { 19 | if (_foundationClasses == nil) { 20 | // 集合中没有NSObject,因为几乎所有的类都是继承自NSObject,具体是不是NSObject需要特殊判断 21 | _foundationClasses = [NSSet setWithObjects: 22 | [NSURL class], 23 | [NSDate class], 24 | [NSValue class], 25 | [NSData class], 26 | [NSArray class], 27 | [NSDictionary class], 28 | [NSString class], 29 | [NSAttributedString class], nil]; 30 | } 31 | return _foundationClasses; 32 | } 33 | 34 | + (BOOL)isClassFromFoundation:(Class)c 35 | { 36 | if (c == [NSObject class] || c == [NSManagedObject class]) return YES; 37 | 38 | __block BOOL result = NO; 39 | [[self foundatonClasses] enumerateObjectsUsingBlock:^(Class foundationClass, BOOL *stop) { 40 | if (c == foundationClass || [c isSubclassOfClass:foundationClass]) { 41 | result = YES; 42 | *stop = YES; 43 | } 44 | }]; 45 | return result; 46 | } 47 | @end 48 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/MJExtension/MJProperty.h: -------------------------------------------------------------------------------- 1 | // 2 | // MJProperty.h 3 | // MJExtensionExample 4 | // 5 | // Created by MJ Lee on 15/4/17. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 包装一个成员属性 8 | 9 | #import 10 | #import 11 | #import "MJType.h" 12 | 13 | typedef enum { 14 | MJPropertyKeyTypeDictionary = 0, // 字典的key 15 | MJPropertyKeyTypeArray // 数组的key 16 | } MJPropertyKeyType; 17 | 18 | 19 | /** 20 | * 属性的key 21 | */ 22 | @interface MJPropertyKey : NSObject 23 | 24 | @property (copy, nonatomic) NSString *name; 25 | @property (assign, nonatomic) MJPropertyKeyType type; 26 | 27 | /** 28 | * 根据当前的key,也就是name,从object(字典或者数组)中取值 29 | */ 30 | - (id)valueInObject:(id)object; 31 | 32 | @end 33 | 34 | 35 | /** 36 | * 包装一个成员 37 | */ 38 | @interface MJProperty : NSObject 39 | 40 | /** 成员属性 */ 41 | @property (nonatomic, assign) objc_property_t property; 42 | /** 成员属性名 */ 43 | @property (nonatomic, readonly) NSString *name; 44 | 45 | /** 成员变量的类型 */ 46 | @property (nonatomic, readonly) MJType *type; 47 | /** 成员来源于哪个类(可能是父类) */ 48 | @property (nonatomic, assign) Class srcClass; 49 | 50 | 51 | /**** 同一个成员变量 - 父类和子类的行为可能不一致(key、keys、objectClassInArray) ****/ 52 | /** 对应着字典中的key */ 53 | - (void)setKey:(NSString *)key forClass:(Class)c; 54 | /** 对应着字典中的多级key */ 55 | - (NSArray *)propertyKeysFromClass:(Class)c; 56 | 57 | /** 模型数组中的模型类型 */ 58 | - (void)setObjectClassInArray:(Class)objectClass forClass:(Class)c; 59 | - (Class)objectClassInArrayFromClass:(Class)c; 60 | /**** 同一个成员变量 - 父类和子类的行为可能不一致(key、keys、objectClassInArray) ****/ 61 | 62 | /** 63 | * 设置成员变量的值 64 | */ 65 | - (void)setValue:(id)value forObject:(id)object; 66 | /** 67 | * 得到成员变量的值 68 | */ 69 | - (id)valueForObject:(id)object; 70 | 71 | /** 72 | * 初始化 73 | */ 74 | + (instancetype)cachedPropertyWithProperty:(objc_property_t)property; 75 | 76 | @end 77 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/MJExtension/MJProperty.m: -------------------------------------------------------------------------------- 1 | // 2 | // MJProperty.m 3 | // MJExtensionExample 4 | // 5 | // Created by MJ Lee on 15/4/17. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJProperty.h" 10 | #import "MJFoundation.h" 11 | #import "MJExtensionConst.h" 12 | 13 | @implementation MJPropertyKey 14 | 15 | - (id)valueInObject:(id)object 16 | { 17 | if ([object isKindOfClass:[NSDictionary class]] && self.type == MJPropertyKeyTypeDictionary) { 18 | return object[self.name]; 19 | } else if ([object isKindOfClass:[NSArray class]] && self.type == MJPropertyKeyTypeArray) { 20 | return [object count] ? object[self.name.intValue] : nil; 21 | } 22 | return nil; 23 | } 24 | 25 | @end 26 | 27 | @interface MJProperty() 28 | 29 | @property (strong, nonatomic) NSMutableDictionary *propertyKeysDict; 30 | @property (strong, nonatomic) NSMutableDictionary *objectClassInArrayDict; 31 | 32 | @end 33 | 34 | @implementation MJProperty 35 | 36 | - (NSMutableDictionary *)propertyKeysDict 37 | { 38 | if (!_propertyKeysDict) { 39 | self.propertyKeysDict = [NSMutableDictionary dictionary]; 40 | } 41 | return _propertyKeysDict; 42 | } 43 | 44 | - (NSMutableDictionary *)objectClassInArrayDict 45 | { 46 | if (!_objectClassInArrayDict) { 47 | self.objectClassInArrayDict = [NSMutableDictionary dictionary]; 48 | } 49 | return _objectClassInArrayDict; 50 | } 51 | 52 | + (instancetype)cachedPropertyWithProperty:(objc_property_t)property 53 | { 54 | MJProperty *propertyObj = objc_getAssociatedObject(self, property); 55 | if (propertyObj == nil) { 56 | propertyObj = [[self alloc] init]; 57 | propertyObj.property = property; 58 | objc_setAssociatedObject(self, property, propertyObj, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 59 | } 60 | return propertyObj; 61 | } 62 | 63 | - (void)setProperty:(objc_property_t)property 64 | { 65 | _property = property; 66 | 67 | MJExtensionAssertParamNotNil(property); 68 | 69 | // 1.属性名 70 | _name = @(property_getName(property)); 71 | 72 | // 2.成员类型 73 | NSString *attrs = @(property_getAttributes(property)); 74 | NSUInteger loc = 1; 75 | NSUInteger len = [attrs rangeOfString:@","].location - loc; 76 | _type = [MJType cachedTypeWithCode:[attrs substringWithRange:NSMakeRange(loc, len)]]; 77 | } 78 | 79 | /** 80 | * 获得成员变量的值 81 | */ 82 | - (id)valueForObject:(id)object 83 | { 84 | if (_type.KVCDisabled) return [NSNull null]; 85 | return [object valueForKey:_name]; 86 | } 87 | 88 | /** 89 | * 设置成员变量的值 90 | */ 91 | - (void)setValue:(id)value forObject:(id)object 92 | { 93 | if (_type.KVCDisabled || value == nil) return; 94 | [object setValue:value forKey:_name]; 95 | } 96 | 97 | /** 对应着字典中的key */ 98 | - (void)setKey:(NSString *)key forClass:(Class)c 99 | { 100 | if (!key) return; 101 | 102 | // 如果有多级映射 103 | NSArray *oldKeys = [key componentsSeparatedByString:@"."]; 104 | NSMutableArray *propertyKeys = [NSMutableArray array]; 105 | 106 | for (NSString *oldKey in oldKeys) { 107 | NSUInteger start = [oldKey rangeOfString:@"["].location; 108 | if (start != NSNotFound) { // 有索引的key 109 | NSString *prefixKey = [oldKey substringToIndex:start]; 110 | NSString *indexKey = prefixKey; 111 | if (prefixKey.length) { 112 | MJPropertyKey *propertyKey = [[MJPropertyKey alloc] init]; 113 | propertyKey.name = prefixKey; 114 | [propertyKeys addObject:propertyKey]; 115 | 116 | indexKey = [oldKey stringByReplacingOccurrencesOfString:prefixKey withString:@""]; 117 | } 118 | 119 | /** 解析索引 **/ 120 | // 元素 121 | NSArray *cmps = [[indexKey stringByReplacingOccurrencesOfString:@"[" withString:@""] componentsSeparatedByString:@"]"]; 122 | for (NSInteger i = 0; i 10 | /** 11 | * 包装一种类型 12 | */ 13 | @interface MJType : NSObject 14 | /** 类型标识符 */ 15 | @property (nonatomic, copy) NSString *code; 16 | 17 | /** 是否为id类型 */ 18 | @property (nonatomic, readonly, getter=isIdType) BOOL idType; 19 | 20 | /** 是否为基本数字类型:int、float等 */ 21 | @property (nonatomic, readonly, getter=isNumberType) BOOL numberType; 22 | 23 | /** 是否为BOOL类型 */ 24 | @property (nonatomic, readonly, getter=isBoolType) BOOL boolType; 25 | 26 | /** 对象类型(如果是基本数据类型,此值为nil) */ 27 | @property (nonatomic, readonly) Class typeClass; 28 | 29 | /** 类型是否来自于Foundation框架,比如NSString、NSArray */ 30 | @property (nonatomic, readonly, getter = isFromFoundation) BOOL fromFoundation; 31 | /** 类型是否不支持KVC */ 32 | @property (nonatomic, readonly, getter = isKVCDisabled) BOOL KVCDisabled; 33 | 34 | /** 35 | * 获得缓存的类型对象 36 | */ 37 | + (instancetype)cachedTypeWithCode:(NSString *)code; 38 | @end -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/MJExtension/MJType.m: -------------------------------------------------------------------------------- 1 | // 2 | // MJType.m 3 | // MJExtension 4 | // 5 | // Created by mj on 14-1-15. 6 | // Copyright (c) 2014年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "MJType.h" 10 | #import "MJExtension.h" 11 | #import "MJFoundation.h" 12 | #import "MJExtensionConst.h" 13 | 14 | @implementation MJType 15 | 16 | static NSMutableDictionary *_cachedTypes; 17 | + (void)load 18 | { 19 | _cachedTypes = [NSMutableDictionary dictionary]; 20 | } 21 | 22 | + (instancetype)cachedTypeWithCode:(NSString *)code 23 | { 24 | MJExtensionAssertParamNotNil2(code, nil); 25 | 26 | MJType *type = _cachedTypes[code]; 27 | if (type == nil) { 28 | type = [[self alloc] init]; 29 | type.code = code; 30 | _cachedTypes[code] = type; 31 | } 32 | return type; 33 | } 34 | 35 | - (void)setCode:(NSString *)code 36 | { 37 | _code = code; 38 | 39 | MJExtensionAssertParamNotNil(code); 40 | 41 | if ([code isEqualToString:MJTypeId]) { 42 | _idType = YES; 43 | } else if (code.length == 0) { 44 | _KVCDisabled = YES; 45 | } else if (code.length > 3 && [code hasPrefix:@"@\""]) { 46 | // 去掉@"和",截取中间的类型名称 47 | _code = [code substringWithRange:NSMakeRange(2, code.length - 3)]; 48 | _typeClass = NSClassFromString(_code); 49 | _fromFoundation = [MJFoundation isClassFromFoundation:_typeClass]; 50 | _numberType = (_typeClass == [NSNumber class] || [_typeClass isSubclassOfClass:[NSNumber class]]); 51 | } else if ([code isEqualToString:MJTypeSEL] || 52 | [code isEqualToString:MJTypeIvar] || 53 | [code isEqualToString:MJTypeMethod]) { 54 | _KVCDisabled = YES; 55 | } 56 | 57 | // 是否为数字类型 58 | NSString *lowerCode = _code.lowercaseString; 59 | NSArray *numberTypes = @[MJTypeInt, MJTypeShort, MJTypeBOOL1, MJTypeBOOL2, MJTypeFloat, MJTypeDouble, MJTypeLong, MJTypeChar]; 60 | if ([numberTypes containsObject:lowerCode]) { 61 | _numberType = YES; 62 | 63 | if ([lowerCode isEqualToString:MJTypeBOOL1] 64 | || [lowerCode isEqualToString:MJTypeBOOL2]) { 65 | _boolType = YES; 66 | } 67 | } 68 | } 69 | @end 70 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/MJExtension/NSObject+MJCoding.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+MJCoding.h 3 | // MJExtension 4 | // 5 | // Created by mj on 14-1-15. 6 | // Copyright (c) 2014年 小码哥. All rights reserved. 7 | // 8 | 9 | #import 10 | /** 11 | * Codeing协议 12 | */ 13 | @protocol MJCoding 14 | @optional 15 | /** 16 | * 这个数组中的属性名才会进行归档 17 | */ 18 | + (NSArray *)allowedCodingPropertyNames; 19 | /** 20 | * 这个数组中的属性名将会被忽略:不进行归档 21 | */ 22 | + (NSArray *)ignoredCodingPropertyNames; 23 | @end 24 | 25 | @interface NSObject (MJCoding) 26 | /** 27 | * 解码(从文件中解析对象) 28 | */ 29 | - (void)decode:(NSCoder *)decoder; 30 | /** 31 | * 编码(将对象写入文件中) 32 | */ 33 | - (void)encode:(NSCoder *)encoder; 34 | @end 35 | 36 | /** 37 | 归档的实现 38 | */ 39 | #define MJCodingImplementation \ 40 | - (id)initWithCoder:(NSCoder *)decoder \ 41 | { \ 42 | if (self = [super init]) { \ 43 | [self decode:decoder]; \ 44 | } \ 45 | return self; \ 46 | } \ 47 | \ 48 | - (void)encodeWithCoder:(NSCoder *)encoder \ 49 | { \ 50 | [self encode:encoder]; \ 51 | } 52 | 53 | #define MJExtensionCodingImplementation MJCodingImplementation -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/MJExtension/NSObject+MJCoding.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+MJCoding.m 3 | // MJExtension 4 | // 5 | // Created by mj on 14-1-15. 6 | // Copyright (c) 2014年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "NSObject+MJCoding.h" 10 | #import "NSObject+MJProperty.h" 11 | #import "MJProperty.h" 12 | 13 | @implementation NSObject (MJCoding) 14 | 15 | - (void)encode:(NSCoder *)encoder 16 | { 17 | Class aClass = [self class]; 18 | 19 | NSArray *allowedCodingPropertyNames = [aClass totalAllowedCodingPropertyNames]; 20 | NSArray *ignoredCodingPropertyNames = [aClass totalIgnoredCodingPropertyNames]; 21 | 22 | [aClass enumerateProperties:^(MJProperty *property, BOOL *stop) { 23 | if (allowedCodingPropertyNames.count && ![allowedCodingPropertyNames containsObject:property.name]) return; 24 | // 检测是否被忽略 25 | if ([ignoredCodingPropertyNames containsObject:property.name]) return; 26 | 27 | id value = [property valueForObject:self]; 28 | if (value == nil) return; 29 | [encoder encodeObject:value forKey:property.name]; 30 | }]; 31 | } 32 | 33 | - (void)decode:(NSCoder *)decoder 34 | { 35 | Class aClass = [self class]; 36 | 37 | NSArray *allowedCodingPropertyNames = [aClass totalAllowedCodingPropertyNames]; 38 | NSArray *ignoredCodingPropertyNames = [aClass totalIgnoredCodingPropertyNames]; 39 | 40 | [aClass enumerateProperties:^(MJProperty *property, BOOL *stop) { 41 | if (allowedCodingPropertyNames.count && ![allowedCodingPropertyNames containsObject:property.name]) return; 42 | // 检测是否被忽略 43 | if ([ignoredCodingPropertyNames containsObject:property.name]) return; 44 | 45 | id value = [decoder decodeObjectForKey:property.name]; 46 | if (value == nil) return; 47 | [property setValue:value forObject:self]; 48 | }]; 49 | } 50 | @end 51 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/MJExtension/NSObject+MJKeyValue.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+MJKeyValue.h 3 | // MJExtension 4 | // 5 | // Created by mj on 13-8-24. 6 | // Copyright (c) 2013年 小码哥. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MJExtensionConst.h" 11 | #import 12 | #import "MJProperty.h" 13 | 14 | /** 15 | * KeyValue协议 16 | */ 17 | @protocol MJKeyValue 18 | @optional 19 | /** 20 | * 只有这个数组中的属性名才允许进行字典和模型的转换 21 | */ 22 | + (NSArray *)allowedPropertyNames; 23 | 24 | /** 25 | * 这个数组中的属性名将会被忽略:不进行字典和模型的转换 26 | */ 27 | + (NSArray *)ignoredPropertyNames; 28 | 29 | /** 30 | * 将属性名换为其他key去字典中取值 31 | * 32 | * @return 字典中的key是属性名,value是从字典中取值用的key 33 | */ 34 | + (NSDictionary *)replacedKeyFromPropertyName; 35 | 36 | /** 37 | * 将属性名换为其他key去字典中取值 38 | * 39 | * @return 从字典中取值用的key 40 | */ 41 | + (NSString *)replacedKeyFromPropertyName121:(NSString *)propertyName; 42 | 43 | /** 44 | * 数组中需要转换的模型类 45 | * 46 | * @return 字典中的key是数组属性名,value是数组中存放模型的Class(Class类型或者NSString类型) 47 | */ 48 | + (NSDictionary *)objectClassInArray; 49 | 50 | /** 51 | * 旧值换新值,用于过滤字典中的值 52 | * 53 | * @param oldValue 旧值 54 | * 55 | * @return 新值 56 | */ 57 | - (id)newValueFromOldValue:(id)oldValue property:(MJProperty *)property; 58 | 59 | /** 60 | * 当字典转模型完毕时调用 61 | */ 62 | - (void)keyValuesDidFinishConvertingToObject; 63 | 64 | /** 65 | * 当模型转字典完毕时调用 66 | */ 67 | - (void)objectDidFinishConvertingToKeyValues; 68 | @end 69 | 70 | @interface NSObject (MJKeyValue) 71 | /** 72 | * 将字典的键值对转成模型属性 73 | * @param keyValues 字典 74 | */ 75 | - (instancetype)setKeyValues:(id)keyValues; 76 | - (instancetype)setKeyValues:(id)keyValues error:(NSError **)error; 77 | 78 | /** 79 | * 将字典的键值对转成模型属性 80 | * @param keyValues 字典 81 | * @param context CoreData上下文 82 | */ 83 | - (instancetype)setKeyValues:(id)keyValues context:(NSManagedObjectContext *)context; 84 | - (instancetype)setKeyValues:(id)keyValues context:(NSManagedObjectContext *)context error:(NSError **)error; 85 | 86 | /** 87 | * 模型转字典时,字典的key是否参考replacedKeyFromPropertyName等方法(父类设置了,子类也会继承下来) 88 | */ 89 | + (void)referenceReplacedKeyWhenCreatingKeyValues:(BOOL)reference; 90 | 91 | /** 92 | * 将模型转成字典 93 | * @return 字典 94 | */ 95 | - (NSMutableDictionary *)keyValues; 96 | - (NSMutableDictionary *)keyValuesWithKeys:(NSArray *)keys; 97 | - (NSMutableDictionary *)keyValuesWithIgnoredKeys:(NSArray *)ignoredKeys; 98 | - (NSMutableDictionary *)keyValuesWithError:(NSError **)error; 99 | - (NSMutableDictionary *)keyValuesWithKeys:(NSArray *)keys error:(NSError **)error; 100 | - (NSMutableDictionary *)keyValuesWithIgnoredKeys:(NSArray *)ignoredKeys error:(NSError **)error; 101 | 102 | /** 103 | * 通过模型数组来创建一个字典数组 104 | * @param objectArray 模型数组 105 | * @return 字典数组 106 | */ 107 | + (NSMutableArray *)keyValuesArrayWithObjectArray:(NSArray *)objectArray; 108 | + (NSMutableArray *)keyValuesArrayWithObjectArray:(NSArray *)objectArray keys:(NSArray *)keys; 109 | + (NSMutableArray *)keyValuesArrayWithObjectArray:(NSArray *)objectArray ignoredKeys:(NSArray *)ignoredKeys; 110 | + (NSMutableArray *)keyValuesArrayWithObjectArray:(NSArray *)objectArray error:(NSError **)error; 111 | + (NSMutableArray *)keyValuesArrayWithObjectArray:(NSArray *)objectArray keys:(NSArray *)keys error:(NSError **)error; 112 | + (NSMutableArray *)keyValuesArrayWithObjectArray:(NSArray *)objectArray ignoredKeys:(NSArray *)ignoredKeys error:(NSError **)error; 113 | 114 | #pragma mark - 字典转模型 115 | /** 116 | * 通过字典来创建一个模型 117 | * @param keyValues 字典(可以是NSDictionary、NSData、NSString) 118 | * @return 新建的对象 119 | */ 120 | + (instancetype)objectWithKeyValues:(id)keyValues; 121 | + (instancetype)objectWithKeyValues:(id)keyValues error:(NSError **)error; 122 | 123 | /** 124 | * 通过字典来创建一个CoreData模型 125 | * @param keyValues 字典(可以是NSDictionary、NSData、NSString) 126 | * @param context CoreData上下文 127 | * @return 新建的对象 128 | */ 129 | + (instancetype)objectWithKeyValues:(id)keyValues context:(NSManagedObjectContext *)context; 130 | + (instancetype)objectWithKeyValues:(id)keyValues context:(NSManagedObjectContext *)context error:(NSError **)error; 131 | 132 | /** 133 | * 通过plist来创建一个模型 134 | * @param filename 文件名(仅限于mainBundle中的文件) 135 | * @return 新建的对象 136 | */ 137 | + (instancetype)objectWithFilename:(NSString *)filename; 138 | + (instancetype)objectWithFilename:(NSString *)filename error:(NSError **)error; 139 | 140 | /** 141 | * 通过plist来创建一个模型 142 | * @param file 文件全路径 143 | * @return 新建的对象 144 | */ 145 | + (instancetype)objectWithFile:(NSString *)file; 146 | + (instancetype)objectWithFile:(NSString *)file error:(NSError **)error; 147 | 148 | #pragma mark - 字典数组转模型数组 149 | /** 150 | * 通过字典数组来创建一个模型数组 151 | * @param keyValuesArray 字典数组(可以是NSDictionary、NSData、NSString) 152 | * @return 模型数组 153 | */ 154 | + (NSMutableArray *)objectArrayWithKeyValuesArray:(id)keyValuesArray; 155 | + (NSMutableArray *)objectArrayWithKeyValuesArray:(id)keyValuesArray error:(NSError **)error; 156 | 157 | /** 158 | * 通过字典数组来创建一个模型数组 159 | * @param keyValuesArray 字典数组(可以是NSDictionary、NSData、NSString) 160 | * @param context CoreData上下文 161 | * @return 模型数组 162 | */ 163 | + (NSMutableArray *)objectArrayWithKeyValuesArray:(id)keyValuesArray context:(NSManagedObjectContext *)context; 164 | + (NSMutableArray *)objectArrayWithKeyValuesArray:(id)keyValuesArray context:(NSManagedObjectContext *)context error:(NSError **)error; 165 | 166 | /** 167 | * 通过plist来创建一个模型数组 168 | * @param filename 文件名(仅限于mainBundle中的文件) 169 | * @return 模型数组 170 | */ 171 | + (NSMutableArray *)objectArrayWithFilename:(NSString *)filename; 172 | + (NSMutableArray *)objectArrayWithFilename:(NSString *)filename error:(NSError **)error; 173 | 174 | /** 175 | * 通过plist来创建一个模型数组 176 | * @param file 文件全路径 177 | * @return 模型数组 178 | */ 179 | + (NSMutableArray *)objectArrayWithFile:(NSString *)file; 180 | + (NSMutableArray *)objectArrayWithFile:(NSString *)file error:(NSError **)error; 181 | 182 | #pragma mark - 转换为JSON 183 | - (NSData *)JSONData; 184 | - (id)JSONObject; 185 | - (NSString *)JSONString; 186 | @end 187 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/MJExtension/NSObject+MJProperty.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+MJProperty.h 3 | // MJExtensionExample 4 | // 5 | // Created by MJ Lee on 15/4/17. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class MJProperty, MJProperty; 12 | 13 | /** 14 | * 遍历所有类的block(父类) 15 | */ 16 | typedef void (^MJClassesEnumeration)(Class c, BOOL *stop); 17 | 18 | /** 19 | * 遍历成员变量用的block 20 | * 21 | * @param property 成员的包装对象 22 | * @param stop YES代表停止遍历,NO代表继续遍历 23 | */ 24 | typedef void (^MJPropertiesEnumeration)(MJProperty *property, BOOL *stop); 25 | 26 | /** 将属性名换为其他key去字典中取值 */ 27 | typedef NSDictionary * (^MJReplacedKeyFromPropertyName)(); 28 | typedef NSString * (^MJReplacedKeyFromPropertyName121)(NSString *propertyName); 29 | /** 数组中需要转换的模型类 */ 30 | typedef NSDictionary * (^MJObjectClassInArray)(); 31 | /** 用于过滤字典中的值 */ 32 | typedef id (^MJNewValueFromOldValue)(id object, id oldValue, MJProperty *property); 33 | 34 | /** 这个数组中的属性名才会进行字典和模型的转换 */ 35 | typedef NSArray * (^MJAllowedPropertyNames)(); 36 | /** 这个数组中的属性名才会进行归档 */ 37 | typedef NSArray * (^MJAllowedCodingPropertyNames)(); 38 | 39 | /** 这个数组中的属性名将会被忽略:不进行字典和模型的转换 */ 40 | typedef NSArray * (^MJIgnoredPropertyNames)(); 41 | /** 这个数组中的属性名将会被忽略:不进行归档 */ 42 | typedef NSArray * (^MJIgnoredCodingPropertyNames)(); 43 | 44 | @interface NSObject (MJProperty) 45 | #pragma mark - 遍历 46 | /** 47 | * 遍历所有的成员 48 | */ 49 | + (void)enumerateProperties:(MJPropertiesEnumeration)enumeration; 50 | 51 | /** 52 | * 遍历所有的类 53 | */ 54 | + (void)enumerateClasses:(MJClassesEnumeration)enumeration; 55 | + (void)enumerateAllClasses:(MJClassesEnumeration)enumeration; 56 | 57 | #pragma mark - 新值配置 58 | /** 59 | * 用于过滤字典中的值 60 | * 61 | * @param newValueFormOldValue 用于过滤字典中的值 62 | */ 63 | + (void)setupNewValueFormOldValue:(MJNewValueFromOldValue)newValueFormOldValue; 64 | + (id)getNewValueFormOldValue:(__weak id)oldValue object:(__weak id)object property:(__weak MJProperty *)property; 65 | 66 | #pragma mark - key配置 67 | /** 68 | * 将属性名换为其他key去字典中取值 69 | * 70 | * @param replacedKeyFromPropertyName 将属性名换为其他key去字典中取值 71 | */ 72 | + (void)setupReplacedKeyFromPropertyName:(MJReplacedKeyFromPropertyName)replacedKeyFromPropertyName; 73 | /** 74 | * 将属性名换为其他key去字典中取值 75 | * 76 | * @param replacedKeyFromPropertyName 将属性名换为其他key去字典中取值 77 | */ 78 | + (void)setupReplacedKeyFromPropertyName121:(MJReplacedKeyFromPropertyName121)replacedKeyFromPropertyName121; 79 | 80 | #pragma mark - array model class配置 81 | /** 82 | * 数组中需要转换的模型类 83 | * 84 | * @param objectClassInArray 数组中需要转换的模型类 85 | */ 86 | + (void)setupObjectClassInArray:(MJObjectClassInArray)objectClassInArray; 87 | 88 | #pragma mark - 属性白名单配置 89 | /** 90 | * 这个数组中的属性名才会进行字典和模型的转换 91 | * 92 | * @param allowedPropertyNames 这个数组中的属性名才会进行字典和模型的转换 93 | */ 94 | + (void)setupAllowedPropertyNames:(MJAllowedPropertyNames)allowedPropertyNames; 95 | 96 | /** 97 | * 这个数组中的属性名才会进行字典和模型的转换 98 | */ 99 | + (NSMutableArray *)totalAllowedPropertyNames; 100 | 101 | #pragma mark - 归档属性白名单配置 102 | /** 103 | * 这个数组中的属性名才会进行归档 104 | * 105 | * @param allowedCodingPropertyNames 这个数组中的属性名才会进行归档 106 | */ 107 | + (void)setupAllowedCodingPropertyNames:(MJAllowedCodingPropertyNames)allowedCodingPropertyNames; 108 | 109 | /** 110 | * 这个数组中的属性名才会进行字典和模型的转换 111 | */ 112 | + (NSMutableArray *)totalAllowedCodingPropertyNames; 113 | 114 | #pragma mark - 属性黑名单配置 115 | /** 116 | * 这个数组中的属性名将会被忽略:不进行字典和模型的转换 117 | * 118 | * @param ignoredPropertyNames 这个数组中的属性名将会被忽略:不进行字典和模型的转换 119 | */ 120 | + (void)setupIgnoredPropertyNames:(MJIgnoredPropertyNames)ignoredPropertyNames; 121 | 122 | /** 123 | * 这个数组中的属性名将会被忽略:不进行字典和模型的转换 124 | */ 125 | + (NSMutableArray *)totalIgnoredPropertyNames; 126 | 127 | #pragma mark - 归档属性黑名单配置 128 | /** 129 | * 这个数组中的属性名将会被忽略:不进行归档 130 | * 131 | * @param ignoredCodingPropertyNames 这个数组中的属性名将会被忽略:不进行归档 132 | */ 133 | + (void)setupIgnoredCodingPropertyNames:(MJIgnoredCodingPropertyNames)ignoredCodingPropertyNames; 134 | 135 | /** 136 | * 这个数组中的属性名将会被忽略:不进行归档 137 | */ 138 | + (NSMutableArray *)totalIgnoredCodingPropertyNames; 139 | @end -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/MJExtension/NSString+MJExtension.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+MJExtension.h 3 | // MJExtensionExample 4 | // 5 | // Created by MJ Lee on 15/6/7. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (MJExtension) 12 | /** 13 | * 驼峰转下划线(loveYou -> love_you) 14 | */ 15 | - (NSString *)underlineFromCamel; 16 | /** 17 | * 下划线转驼峰(love_you -> loveYou) 18 | */ 19 | - (NSString *)camelFromUnderline; 20 | /** 21 | * 首字母变大写 22 | */ 23 | - (NSString *)firstCharUpper; 24 | /** 25 | * 首字母变小写 26 | */ 27 | - (NSString *)firstCharLower; 28 | 29 | - (BOOL)isPureInt; 30 | 31 | - (NSURL *)url; 32 | @end 33 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/MJExtension/NSString+MJExtension.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+MJExtension.m 3 | // MJExtensionExample 4 | // 5 | // Created by MJ Lee on 15/6/7. 6 | // Copyright (c) 2015年 小码哥. All rights reserved. 7 | // 8 | 9 | #import "NSString+MJExtension.h" 10 | 11 | @implementation NSString (MJExtension) 12 | - (NSString *)underlineFromCamel 13 | { 14 | if (self.length == 0) return self; 15 | NSMutableString *string = [NSMutableString string]; 16 | for (NSUInteger i = 0; i= 2) [string appendString:[cmp substringFromIndex:1]]; 40 | } else { 41 | [string appendString:cmp]; 42 | } 43 | } 44 | return string; 45 | } 46 | 47 | - (NSString *)firstCharLower 48 | { 49 | if (self.length == 0) return self; 50 | NSMutableString *string = [NSMutableString string]; 51 | [string appendString:[NSString stringWithFormat:@"%c", [self characterAtIndex:0]].lowercaseString]; 52 | if (self.length >= 2) [string appendString:[self substringFromIndex:1]]; 53 | return string; 54 | } 55 | 56 | - (NSString *)firstCharUpper 57 | { 58 | if (self.length == 0) return self; 59 | NSMutableString *string = [NSMutableString string]; 60 | [string appendString:[NSString stringWithFormat:@"%c", [self characterAtIndex:0]].uppercaseString]; 61 | if (self.length >= 2) [string appendString:[self substringFromIndex:1]]; 62 | return string; 63 | } 64 | 65 | - (BOOL)isPureInt 66 | { 67 | NSScanner *scan = [NSScanner scannerWithString:self]; 68 | int val; 69 | return [scan scanInt:&val] && [scan isAtEnd]; 70 | } 71 | 72 | - (NSURL *)url 73 | { 74 | return [NSURL URLWithString:(NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)self,(CFStringRef)@"!$&'()*+,-./:;=?@_~%#[]", NULL,kCFStringEncodingUTF8))]; 75 | } 76 | @end 77 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/NSString+ZHTime.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+ZHTime.h 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSString (ZHTime) 12 | + (NSString *)stringWithTime:(NSTimeInterval)time; 13 | @end 14 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Category/NSString+ZHTime.m: -------------------------------------------------------------------------------- 1 | /// 2 | // NSString+ZHTime.m 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import "NSString+ZHTime.h" 10 | 11 | @implementation NSString (ZHTime) 12 | 13 | + (NSString *)stringWithTime:(NSTimeInterval)time 14 | { 15 | NSInteger min = time / 60; 16 | NSInteger second = (NSInteger)time % 60; 17 | 18 | return [NSString stringWithFormat:@"%02ld:%02ld", min, second]; 19 | } 20 | 21 | 22 | @end 23 | 24 | 25 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Controller/ZHPlayingViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZHPlayingViewController.h 3 | // QQ音乐 4 | // 5 | // Created by 赵赫 on 15/9/9. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ZHPlayingViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Controller/ZHPlayingViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZHPlayingViewController.m 3 | // QQ音乐 4 | // 5 | // Created by 赵赫 on 15/9/9. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import "ZHPlayingViewController.h" 10 | #import 11 | #import "ZHMusic.h" 12 | #import "ZHAudioTool.h" 13 | #import "ZHMusicTool.h" 14 | #import "NSString+ZHTime.h" 15 | #import "CALayer+PauseAimate.h" 16 | #import "ZHLrcView.h" 17 | #import "ZHLrcLabel.h" 18 | 19 | 20 | @interface ZHPlayingViewController () 21 | @property (weak, nonatomic) IBOutlet UIImageView *backgroundImageView; 22 | 23 | @property (weak, nonatomic) IBOutlet UISlider *slidervView; 24 | @property (weak, nonatomic) IBOutlet UIImageView *songView; 25 | 26 | 27 | 28 | @property (weak, nonatomic) IBOutlet UILabel *songLabel; 29 | @property (weak, nonatomic) IBOutlet UILabel *singerLabel; 30 | @property (weak, nonatomic) IBOutlet UILabel *currentTimeLabel; 31 | @property (weak, nonatomic) IBOutlet UILabel *totalTimeLabel; 32 | 33 | 34 | // 播放暂停按钮 35 | @property (weak, nonatomic) IBOutlet UIButton *playOrPauseBtn; 36 | // 37 | // 歌词的View 38 | @property (weak, nonatomic) IBOutlet ZHLrcView *lrcView; 39 | // 歌词的Label 40 | @property (weak, nonatomic) IBOutlet ZHLrcLabel *lrcLabel; 41 | 42 | /** 进度的定时器 */ 43 | @property (nonatomic, strong) NSTimer *progressTimer; 44 | 45 | /** 歌词的定时器 */ 46 | @property (nonatomic, strong) CADisplayLink *lrcTimer; 47 | 48 | /** 当前播放器 */ 49 | @property (nonatomic, weak) AVAudioPlayer *currentPlayer; 50 | 51 | @end 52 | 53 | @implementation ZHPlayingViewController 54 | 55 | - (void)viewDidLoad { 56 | [super viewDidLoad]; 57 | 58 | // 设置毛玻璃效果 59 | [self setBlurView]; 60 | 61 | // 设置Slider 62 | [self setSlider]; 63 | 64 | // 播放歌曲 65 | [self startPlayingMusic]; 66 | 67 | // 设置lrcView 68 | [self setlrcView]; 69 | 70 | 71 | } 72 | 73 | // 设置圆角不能再ViewDidLoad中,因为那时候的Frame还没有确定 74 | - (void)viewWillLayoutSubviews 75 | { 76 | [super viewWillLayoutSubviews]; 77 | 78 | self.songView.layer.cornerRadius = self.songView.frame.size.width * 0.5; 79 | self.songView.layer.masksToBounds = YES; 80 | 81 | self.songView.layer.borderWidth = 7; 82 | self.songView.layer.borderColor = [UIColor colorWithRed:27/255.0 green:27/255.0 blue:27/255.0 alpha:1.0].CGColor; 83 | 84 | 85 | 86 | } 87 | 88 | - (void)setlrcView 89 | { 90 | self.lrcView.contentSize = CGSizeMake(self.view.bounds.size.width * 2, 0); 91 | self.lrcView.delegate = self; 92 | self.lrcView.pagingEnabled = YES; 93 | self.lrcView.showsVerticalScrollIndicator = NO; 94 | self.lrcView.showsHorizontalScrollIndicator = NO; 95 | self.lrcView.lrcLabel = self.lrcLabel; 96 | 97 | } 98 | 99 | - (void)setSlider 100 | { 101 | [self.slidervView setThumbImage:[UIImage imageNamed:@"player_slider_playback_thumb"] forState:UIControlStateNormal]; 102 | // 38 187 102 103 | [self.slidervView setMinimumTrackTintColor:[UIColor colorWithRed:38/255.0 green:187/255.0 blue:102/255.0 alpha:1.0]]; 104 | 105 | 106 | 107 | } 108 | 109 | - (void)setBlurView 110 | { 111 | UIToolbar *blurView = [[UIToolbar alloc] init]; 112 | blurView.barStyle = UIBarStyleBlack; 113 | blurView.frame = self.view.bounds; 114 | [self.backgroundImageView addSubview:blurView]; 115 | 116 | } 117 | 118 | - (UIStatusBarStyle)preferredStatusBarStyle 119 | { 120 | 121 | return UIStatusBarStyleLightContent; 122 | 123 | } 124 | 125 | #pragma mark - 开始播放歌曲 126 | - (void)startPlayingMusic 127 | { 128 | 129 | // 1.获取正在播放的歌曲 130 | ZHMusic *playingMusic = [ZHMusicTool playingMusic]; 131 | 132 | // 2.设置界面基本信息 133 | self.backgroundImageView.image = [UIImage imageNamed:playingMusic.icon]; 134 | self.songView.image = [UIImage imageNamed:playingMusic.icon]; 135 | self.songLabel.text = playingMusic.name; 136 | self.singerLabel.text = playingMusic.singer; 137 | 138 | // 3.播放音乐 139 | AVAudioPlayer *currentPlayer = [ZHAudioTool playMusicWithMuiscName:playingMusic.filename]; 140 | currentPlayer.delegate = self; 141 | self.currentPlayer = currentPlayer; 142 | self.currentTimeLabel.text = [NSString stringWithTime:currentPlayer.currentTime]; 143 | self.totalTimeLabel.text = [NSString stringWithTime:currentPlayer.duration]; 144 | // 4.给iconView添加动画 145 | [self addIconViewAnimate]; 146 | 147 | // 5.添加定时器 148 | [self addProgressTimer]; 149 | 150 | // 6.改变选中(暂停状态) 151 | self.playOrPauseBtn.selected = YES; 152 | 153 | // 7.将歌词名称传递给LrcView 154 | self.lrcView.lrcname = playingMusic.lrcname; 155 | // 8.添加歌词的定时器 156 | [self addLrcTimer]; 157 | 158 | } 159 | 160 | #pragma mark - 对定时器的操作 161 | - (void)addProgressTimer 162 | { 163 | self.progressTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(updateProgressInfo) userInfo:nil repeats:YES]; 164 | 165 | [[NSRunLoop mainRunLoop] addTimer:self.progressTimer forMode:NSRunLoopCommonModes]; 166 | } 167 | 168 | #pragma mark - 更新进度信息 169 | - (void)updateProgressInfo 170 | { 171 | // 1.更新当前播放时间Lable 172 | self.currentTimeLabel.text = [NSString stringWithTime:self.currentPlayer.currentTime]; 173 | 174 | // 2.进度条 175 | self.slidervView.value = self.currentPlayer.currentTime / self.currentPlayer.duration; 176 | 177 | } 178 | 179 | - (void)addIconViewAnimate 180 | { 181 | 182 | // 1.创建基本动画 183 | CABasicAnimation *rotationAnim = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; 184 | 185 | // 2.给动画设置一些属性 186 | rotationAnim.fromValue = @(0); 187 | rotationAnim.toValue = @(M_PI * 2); 188 | rotationAnim.repeatCount = NSIntegerMax; 189 | rotationAnim.duration = 35; 190 | 191 | // 3.将动画添加到iconView的layer上面 192 | [self.songView.layer addAnimation:rotationAnim forKey:nil]; 193 | 194 | 195 | } 196 | 197 | #pragma mark 歌曲播放的控制 198 | - (IBAction)playOrPause 199 | { 200 | 201 | self.playOrPauseBtn.selected = !self.playOrPauseBtn.isSelected; 202 | 203 | if (self.currentPlayer.isPlaying) { 204 | 205 | [self.currentPlayer pause]; 206 | 207 | [self.songView.layer pauseAnimate]; 208 | 209 | [self removeProgressTimer]; 210 | 211 | 212 | }else{ 213 | 214 | [self.currentPlayer play]; 215 | [self.songView.layer resumeAnimate]; 216 | 217 | [self addProgressTimer]; 218 | 219 | } 220 | 221 | 222 | } 223 | - (IBAction)previousMusic 224 | { 225 | [self changeMusicWithNewMusic:[ZHMusicTool previousMusic]]; 226 | 227 | } 228 | - (IBAction)nextMusic 229 | { 230 | [self changeMusicWithNewMusic:[ZHMusicTool nextMusic]]; 231 | 232 | 233 | } 234 | 235 | - (void)changeMusicWithNewMusic:(ZHMusic *)newMusic 236 | { 237 | // 1.停止当前歌曲 238 | ZHMusic *playingMusic = [ZHMusicTool playingMusic]; 239 | [ZHAudioTool stopMusicWithMusicName:playingMusic.filename]; 240 | 241 | // 2.设置上一首歌曲设置成当前歌曲 242 | [ZHMusicTool setPlayingMusic:newMusic]; 243 | 244 | // 3.更新界面信息 245 | [self startPlayingMusic]; 246 | } 247 | 248 | 249 | #pragma mark 监听滑块的事件 250 | - (IBAction)startSlider 251 | { 252 | [self removeProgressTimer]; 253 | } 254 | - (IBAction)endSlider 255 | { 256 | // 1.更新歌曲播放进度 257 | self.currentPlayer.currentTime = self.slidervView.value *self.currentPlayer.duration; 258 | 259 | // 2.添加定时器 260 | [self addProgressTimer]; 261 | 262 | 263 | } 264 | - (IBAction)sliderValueChange 265 | { 266 | // 1.获取当前时间Lable应该显示的时间 267 | NSTimeInterval currentTime = self.slidervView.value *self.currentPlayer.duration; 268 | 269 | // 2.设置当前时间Lable显示文字 270 | self.currentTimeLabel.text = [NSString stringWithTime:currentTime]; 271 | 272 | } 273 | 274 | - (IBAction)sliderClick:(UITapGestureRecognizer *)sender { 275 | 276 | // 1.获取用户点击的点 277 | CGPoint point = [sender locationInView:sender.view]; 278 | 279 | // 2.点击的点在进度条中的比例 280 | CGFloat ratio = point.x / self.slidervView.bounds.size.width; 281 | 282 | // 3.获取当前歌曲应该播放的时间 283 | NSTimeInterval currentTime = self.currentPlayer.duration * ratio; 284 | 285 | self.currentPlayer.currentTime = currentTime; 286 | 287 | // 4.更新进度信息 288 | [self updateProgressInfo]; 289 | 290 | } 291 | 292 | - (void)removeProgressTimer 293 | { 294 | [self.progressTimer invalidate]; 295 | self.progressTimer = nil; 296 | 297 | } 298 | 299 | - (void)addLrcTimer 300 | { 301 | self.lrcTimer = [CADisplayLink displayLinkWithTarget:self selector:@selector(updateLrc)]; 302 | [self.lrcTimer addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes]; 303 | } 304 | #pragma mark - 更新歌词 305 | - (void)updateLrc 306 | { 307 | self.lrcView.currentTime = self.currentPlayer.currentTime; 308 | } 309 | - (void)removeLrcTimer 310 | { 311 | [self.lrcTimer invalidate]; 312 | self.lrcTimer = nil; 313 | } 314 | 315 | #pragma mark - AVAudioPlayerDelegate 316 | - (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag 317 | { 318 | if (flag) { 319 | [self nextMusic]; 320 | } 321 | 322 | } 323 | 324 | #pragma mark - 实现UIScrollView的代理方法 325 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView 326 | { 327 | // 1.取出scrollView偏移量 328 | CGPoint offset = scrollView.contentOffset; 329 | CGFloat offsetRatio = offset.x / scrollView.bounds.size.width; 330 | 331 | // 设置iconView和歌词Label的透明度 332 | self.songView.alpha = 1 - offsetRatio; 333 | self.lrcLabel.alpha = 1 - offsetRatio; 334 | } 335 | 336 | @end 337 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Model/ZHLrcline.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZHLrcline.h 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ZHLrcline : NSObject 12 | /** 时间 */ 13 | @property (nonatomic, assign) NSTimeInterval time; 14 | /** 歌词 */ 15 | @property (nonatomic, copy) NSString *text; 16 | 17 | - (instancetype)initWithLrcString:(NSString *)lrcString; 18 | + (instancetype)lrclineWithLrcString:(NSString *)lrcString; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Model/ZHLrcline.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZHLrcline.m 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import "ZHLrcline.h" 10 | 11 | @implementation ZHLrcline 12 | 13 | - (instancetype)initWithLrcString:(NSString *)lrcString 14 | { 15 | if (self = [super init]) { 16 | // [01:47.46]宁愿用这一生等你发现 17 | self.text = [[lrcString componentsSeparatedByString:@"]"] lastObject]; 18 | // [01:47.46 19 | NSString *timeString = [[[lrcString componentsSeparatedByString:@"]"] firstObject] substringFromIndex:1]; 20 | self.time = [self timeWithString:timeString]; 21 | } 22 | return self; 23 | } 24 | 25 | - (NSTimeInterval)timeWithString:(NSString *)timeString 26 | { 27 | // 01:47.46 28 | NSInteger min = [[[timeString componentsSeparatedByString:@":"] firstObject] integerValue]; 29 | // 47.46 30 | NSInteger second = [[[[[timeString componentsSeparatedByString:@":"] lastObject] componentsSeparatedByString:@"."] firstObject] integerValue]; 31 | NSInteger haomiao = [[[[[timeString componentsSeparatedByString:@":"] lastObject] componentsSeparatedByString:@"."] lastObject] integerValue]; 32 | 33 | return min * 60 + second + haomiao * 0.01; 34 | } 35 | 36 | + (instancetype)lrclineWithLrcString:(NSString *)lrcString 37 | { 38 | return [[self alloc] initWithLrcString:lrcString]; 39 | } 40 | @end 41 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Model/ZHMusic.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZHMusic.h 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ZHMusic : NSObject 12 | 13 | @property (nonatomic, copy) NSString *name; 14 | @property (nonatomic, copy) NSString *filename; 15 | @property (nonatomic, copy) NSString *lrcname; 16 | @property (nonatomic, copy) NSString *singer; 17 | @property (nonatomic, copy) NSString *singerIcon; 18 | @property (nonatomic, copy) NSString *icon; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Model/ZHMusic.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZHMusic.m 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import "ZHMusic.h" 10 | 11 | @implementation ZHMusic 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // QQ音乐 4 | // 5 | // Created by 赵赫 on 15/9/9. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // QQ音乐 4 | // 5 | // Created by 赵赫 on 15/9/9. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/MASCompositeConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASCompositeConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | #import "MASUtilities.h" 11 | 12 | /** 13 | * A group of MASConstraint objects 14 | */ 15 | @interface MASCompositeConstraint : MASConstraint 16 | 17 | /** 18 | * Creates a composite with a predefined array of children 19 | * 20 | * @param children child MASConstraints 21 | * 22 | * @return a composite constraint 23 | */ 24 | - (id)initWithChildren:(NSArray *)children; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/MASCompositeConstraint.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASCompositeConstraint.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASCompositeConstraint.h" 10 | #import "MASConstraint+Private.h" 11 | 12 | @interface MASCompositeConstraint () 13 | 14 | @property (nonatomic, strong) id mas_key; 15 | @property (nonatomic, strong) NSMutableArray *childConstraints; 16 | 17 | @end 18 | 19 | @implementation MASCompositeConstraint 20 | 21 | - (id)initWithChildren:(NSArray *)children { 22 | self = [super init]; 23 | if (!self) return nil; 24 | 25 | _childConstraints = [children mutableCopy]; 26 | for (MASConstraint *constraint in _childConstraints) { 27 | constraint.delegate = self; 28 | } 29 | 30 | return self; 31 | } 32 | 33 | #pragma mark - MASConstraintDelegate 34 | 35 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint { 36 | NSUInteger index = [self.childConstraints indexOfObject:constraint]; 37 | NSAssert(index != NSNotFound, @"Could not find constraint %@", constraint); 38 | [self.childConstraints replaceObjectAtIndex:index withObject:replacementConstraint]; 39 | } 40 | 41 | - (MASConstraint *)constraint:(MASConstraint __unused *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { 42 | id strongDelegate = self.delegate; 43 | MASConstraint *newConstraint = [strongDelegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; 44 | newConstraint.delegate = self; 45 | [self.childConstraints addObject:newConstraint]; 46 | return newConstraint; 47 | } 48 | 49 | #pragma mark - NSLayoutConstraint multiplier proxies 50 | 51 | - (MASConstraint * (^)(CGFloat))multipliedBy { 52 | return ^id(CGFloat multiplier) { 53 | for (MASConstraint *constraint in self.childConstraints) { 54 | constraint.multipliedBy(multiplier); 55 | } 56 | return self; 57 | }; 58 | } 59 | 60 | - (MASConstraint * (^)(CGFloat))dividedBy { 61 | return ^id(CGFloat divider) { 62 | for (MASConstraint *constraint in self.childConstraints) { 63 | constraint.dividedBy(divider); 64 | } 65 | return self; 66 | }; 67 | } 68 | 69 | #pragma mark - MASLayoutPriority proxy 70 | 71 | - (MASConstraint * (^)(MASLayoutPriority))priority { 72 | return ^id(MASLayoutPriority priority) { 73 | for (MASConstraint *constraint in self.childConstraints) { 74 | constraint.priority(priority); 75 | } 76 | return self; 77 | }; 78 | } 79 | 80 | #pragma mark - NSLayoutRelation proxy 81 | 82 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { 83 | return ^id(id attr, NSLayoutRelation relation) { 84 | for (MASConstraint *constraint in self.childConstraints.copy) { 85 | constraint.equalToWithRelation(attr, relation); 86 | } 87 | return self; 88 | }; 89 | } 90 | 91 | #pragma mark - attribute chaining 92 | 93 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { 94 | [self constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; 95 | return self; 96 | } 97 | 98 | #pragma mark - Animator proxy 99 | 100 | #if TARGET_OS_MAC && !TARGET_OS_IPHONE 101 | 102 | - (MASConstraint *)animator { 103 | for (MASConstraint *constraint in self.childConstraints) { 104 | [constraint animator]; 105 | } 106 | return self; 107 | } 108 | 109 | #endif 110 | 111 | #pragma mark - debug helpers 112 | 113 | - (MASConstraint * (^)(id))key { 114 | return ^id(id key) { 115 | self.mas_key = key; 116 | int i = 0; 117 | for (MASConstraint *constraint in self.childConstraints) { 118 | constraint.key([NSString stringWithFormat:@"%@[%d]", key, i++]); 119 | } 120 | return self; 121 | }; 122 | } 123 | 124 | #pragma mark - NSLayoutConstraint constant setters 125 | 126 | - (void)setInsets:(MASEdgeInsets)insets { 127 | for (MASConstraint *constraint in self.childConstraints) { 128 | constraint.insets = insets; 129 | } 130 | } 131 | 132 | - (void)setOffset:(CGFloat)offset { 133 | for (MASConstraint *constraint in self.childConstraints) { 134 | constraint.offset = offset; 135 | } 136 | } 137 | 138 | - (void)setSizeOffset:(CGSize)sizeOffset { 139 | for (MASConstraint *constraint in self.childConstraints) { 140 | constraint.sizeOffset = sizeOffset; 141 | } 142 | } 143 | 144 | - (void)setCenterOffset:(CGPoint)centerOffset { 145 | for (MASConstraint *constraint in self.childConstraints) { 146 | constraint.centerOffset = centerOffset; 147 | } 148 | } 149 | 150 | #pragma mark - MASConstraint 151 | 152 | - (void)activate { 153 | for (MASConstraint *constraint in self.childConstraints) { 154 | [constraint activate]; 155 | } 156 | } 157 | 158 | - (void)deactivate { 159 | for (MASConstraint *constraint in self.childConstraints) { 160 | [constraint deactivate]; 161 | } 162 | } 163 | 164 | - (void)install { 165 | for (MASConstraint *constraint in self.childConstraints) { 166 | constraint.updateExisting = self.updateExisting; 167 | [constraint install]; 168 | } 169 | } 170 | 171 | - (void)uninstall { 172 | for (MASConstraint *constraint in self.childConstraints) { 173 | [constraint uninstall]; 174 | } 175 | } 176 | 177 | @end 178 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/MASConstraint+Private.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraint+Private.h 3 | // Masonry 4 | // 5 | // Created by Nick Tymchenko on 29/04/14. 6 | // Copyright (c) 2014 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | 11 | @protocol MASConstraintDelegate; 12 | 13 | 14 | @interface MASConstraint () 15 | 16 | /** 17 | * Whether or not to check for an existing constraint instead of adding constraint 18 | */ 19 | @property (nonatomic, assign) BOOL updateExisting; 20 | 21 | /** 22 | * Usually MASConstraintMaker but could be a parent MASConstraint 23 | */ 24 | @property (nonatomic, weak) id delegate; 25 | 26 | /** 27 | * Based on a provided value type, is equal to calling: 28 | * NSNumber - setOffset: 29 | * NSValue with CGPoint - setPointOffset: 30 | * NSValue with CGSize - setSizeOffset: 31 | * NSValue with MASEdgeInsets - setInsets: 32 | */ 33 | - (void)setLayoutConstantWithValue:(NSValue *)value; 34 | 35 | @end 36 | 37 | 38 | @interface MASConstraint (Abstract) 39 | 40 | /** 41 | * Sets the constraint relation to given NSLayoutRelation 42 | * returns a block which accepts one of the following: 43 | * MASViewAttribute, UIView, NSValue, NSArray 44 | * see readme for more details. 45 | */ 46 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation; 47 | 48 | /** 49 | * Override to set a custom chaining behaviour 50 | */ 51 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; 52 | 53 | @end 54 | 55 | 56 | @protocol MASConstraintDelegate 57 | 58 | /** 59 | * Notifies the delegate when the constraint needs to be replaced with another constraint. For example 60 | * A MASViewConstraint may turn into a MASCompositeConstraint when an array is passed to one of the equality blocks 61 | */ 62 | - (void)constraint:(MASConstraint *)constraint shouldBeReplacedWithConstraint:(MASConstraint *)replacementConstraint; 63 | 64 | - (MASConstraint *)constraint:(MASConstraint *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute; 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/MASConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 22/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * Enables Constraints to be created with chainable syntax 13 | * Constraint can represent single NSLayoutConstraint (MASViewConstraint) 14 | * or a group of NSLayoutConstraints (MASComposisteConstraint) 15 | */ 16 | @interface MASConstraint : NSObject 17 | 18 | // Chaining Support 19 | 20 | /** 21 | * Modifies the NSLayoutConstraint constant, 22 | * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following 23 | * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight 24 | */ 25 | - (MASConstraint * (^)(MASEdgeInsets insets))insets; 26 | 27 | /** 28 | * Modifies the NSLayoutConstraint constant, 29 | * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following 30 | * NSLayoutAttributeWidth, NSLayoutAttributeHeight 31 | */ 32 | - (MASConstraint * (^)(CGSize offset))sizeOffset; 33 | 34 | /** 35 | * Modifies the NSLayoutConstraint constant, 36 | * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following 37 | * NSLayoutAttributeCenterX, NSLayoutAttributeCenterY 38 | */ 39 | - (MASConstraint * (^)(CGPoint offset))centerOffset; 40 | 41 | /** 42 | * Modifies the NSLayoutConstraint constant 43 | */ 44 | - (MASConstraint * (^)(CGFloat offset))offset; 45 | 46 | /** 47 | * Modifies the NSLayoutConstraint constant based on a value type 48 | */ 49 | - (MASConstraint * (^)(NSValue *value))valueOffset; 50 | 51 | /** 52 | * Sets the NSLayoutConstraint multiplier property 53 | */ 54 | - (MASConstraint * (^)(CGFloat multiplier))multipliedBy; 55 | 56 | /** 57 | * Sets the NSLayoutConstraint multiplier to 1.0/dividedBy 58 | */ 59 | - (MASConstraint * (^)(CGFloat divider))dividedBy; 60 | 61 | /** 62 | * Sets the NSLayoutConstraint priority to a float or MASLayoutPriority 63 | */ 64 | - (MASConstraint * (^)(MASLayoutPriority priority))priority; 65 | 66 | /** 67 | * Sets the NSLayoutConstraint priority to MASLayoutPriorityLow 68 | */ 69 | - (MASConstraint * (^)())priorityLow; 70 | 71 | /** 72 | * Sets the NSLayoutConstraint priority to MASLayoutPriorityMedium 73 | */ 74 | - (MASConstraint * (^)())priorityMedium; 75 | 76 | /** 77 | * Sets the NSLayoutConstraint priority to MASLayoutPriorityHigh 78 | */ 79 | - (MASConstraint * (^)())priorityHigh; 80 | 81 | /** 82 | * Sets the constraint relation to NSLayoutRelationEqual 83 | * returns a block which accepts one of the following: 84 | * MASViewAttribute, UIView, NSValue, NSArray 85 | * see readme for more details. 86 | */ 87 | - (MASConstraint * (^)(id attr))equalTo; 88 | 89 | /** 90 | * Sets the constraint relation to NSLayoutRelationGreaterThanOrEqual 91 | * returns a block which accepts one of the following: 92 | * MASViewAttribute, UIView, NSValue, NSArray 93 | * see readme for more details. 94 | */ 95 | - (MASConstraint * (^)(id attr))greaterThanOrEqualTo; 96 | 97 | /** 98 | * Sets the constraint relation to NSLayoutRelationLessThanOrEqual 99 | * returns a block which accepts one of the following: 100 | * MASViewAttribute, UIView, NSValue, NSArray 101 | * see readme for more details. 102 | */ 103 | - (MASConstraint * (^)(id attr))lessThanOrEqualTo; 104 | 105 | /** 106 | * Optional semantic property which has no effect but improves the readability of constraint 107 | */ 108 | - (MASConstraint *)with; 109 | 110 | /** 111 | * Optional semantic property which has no effect but improves the readability of constraint 112 | */ 113 | - (MASConstraint *)and; 114 | 115 | /** 116 | * Creates a new MASCompositeConstraint with the called attribute and reciever 117 | */ 118 | - (MASConstraint *)left; 119 | - (MASConstraint *)top; 120 | - (MASConstraint *)right; 121 | - (MASConstraint *)bottom; 122 | - (MASConstraint *)leading; 123 | - (MASConstraint *)trailing; 124 | - (MASConstraint *)width; 125 | - (MASConstraint *)height; 126 | - (MASConstraint *)centerX; 127 | - (MASConstraint *)centerY; 128 | - (MASConstraint *)baseline; 129 | 130 | #if TARGET_OS_IPHONE 131 | 132 | - (MASConstraint *)leftMargin; 133 | - (MASConstraint *)rightMargin; 134 | - (MASConstraint *)topMargin; 135 | - (MASConstraint *)bottomMargin; 136 | - (MASConstraint *)leadingMargin; 137 | - (MASConstraint *)trailingMargin; 138 | - (MASConstraint *)centerXWithinMargins; 139 | - (MASConstraint *)centerYWithinMargins; 140 | 141 | #endif 142 | 143 | 144 | /** 145 | * Sets the constraint debug name 146 | */ 147 | - (MASConstraint * (^)(id key))key; 148 | 149 | // NSLayoutConstraint constant Setters 150 | // for use outside of mas_updateConstraints/mas_makeConstraints blocks 151 | 152 | /** 153 | * Modifies the NSLayoutConstraint constant, 154 | * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following 155 | * NSLayoutAttributeTop, NSLayoutAttributeLeft, NSLayoutAttributeBottom, NSLayoutAttributeRight 156 | */ 157 | - (void)setInsets:(MASEdgeInsets)insets; 158 | 159 | /** 160 | * Modifies the NSLayoutConstraint constant, 161 | * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following 162 | * NSLayoutAttributeWidth, NSLayoutAttributeHeight 163 | */ 164 | - (void)setSizeOffset:(CGSize)sizeOffset; 165 | 166 | /** 167 | * Modifies the NSLayoutConstraint constant, 168 | * only affects MASConstraints in which the first item's NSLayoutAttribute is one of the following 169 | * NSLayoutAttributeCenterX, NSLayoutAttributeCenterY 170 | */ 171 | - (void)setCenterOffset:(CGPoint)centerOffset; 172 | 173 | /** 174 | * Modifies the NSLayoutConstraint constant 175 | */ 176 | - (void)setOffset:(CGFloat)offset; 177 | 178 | 179 | // NSLayoutConstraint Installation support 180 | 181 | #if TARGET_OS_MAC && !TARGET_OS_IPHONE 182 | /** 183 | * Whether or not to go through the animator proxy when modifying the constraint 184 | */ 185 | @property (nonatomic, copy, readonly) MASConstraint *animator; 186 | #endif 187 | 188 | /** 189 | * Activates an NSLayoutConstraint if it's supported by an OS. 190 | * Invokes install otherwise. 191 | */ 192 | - (void)activate; 193 | 194 | /** 195 | * Deactivates previously installed/activated NSLayoutConstraint. 196 | */ 197 | - (void)deactivate; 198 | 199 | /** 200 | * Creates a NSLayoutConstraint and adds it to the appropriate view. 201 | */ 202 | - (void)install; 203 | 204 | /** 205 | * Removes previously installed NSLayoutConstraint 206 | */ 207 | - (void)uninstall; 208 | 209 | @end 210 | 211 | 212 | /** 213 | * Convenience auto-boxing macros for MASConstraint methods. 214 | * 215 | * Defining MAS_SHORTHAND_GLOBALS will turn on auto-boxing for default syntax. 216 | * A potential drawback of this is that the unprefixed macros will appear in global scope. 217 | */ 218 | #define mas_equalTo(...) equalTo(MASBoxValue((__VA_ARGS__))) 219 | #define mas_greaterThanOrEqualTo(...) greaterThanOrEqualTo(MASBoxValue((__VA_ARGS__))) 220 | #define mas_lessThanOrEqualTo(...) lessThanOrEqualTo(MASBoxValue((__VA_ARGS__))) 221 | 222 | #define mas_offset(...) valueOffset(MASBoxValue((__VA_ARGS__))) 223 | 224 | 225 | #ifdef MAS_SHORTHAND_GLOBALS 226 | 227 | #define equalTo(...) mas_equalTo(__VA_ARGS__) 228 | #define greaterThanOrEqualTo(...) mas_greaterThanOrEqualTo(__VA_ARGS__) 229 | #define lessThanOrEqualTo(...) mas_lessThanOrEqualTo(__VA_ARGS__) 230 | 231 | #define offset(...) mas_offset(__VA_ARGS__) 232 | 233 | #endif 234 | 235 | 236 | @interface MASConstraint (AutoboxingSupport) 237 | 238 | /** 239 | * Aliases to corresponding relation methods (for shorthand macros) 240 | * Also needed to aid autocompletion 241 | */ 242 | - (MASConstraint * (^)(id attr))mas_equalTo; 243 | - (MASConstraint * (^)(id attr))mas_greaterThanOrEqualTo; 244 | - (MASConstraint * (^)(id attr))mas_lessThanOrEqualTo; 245 | 246 | /** 247 | * A dummy method to aid autocompletion 248 | */ 249 | - (MASConstraint * (^)(id offset))mas_offset; 250 | 251 | @end 252 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/MASConstraint.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraint.m 3 | // Masonry 4 | // 5 | // Created by Nick Tymchenko on 1/20/14. 6 | // 7 | 8 | #import "MASConstraint.h" 9 | #import "MASConstraint+Private.h" 10 | 11 | #define MASMethodNotImplemented() \ 12 | @throw [NSException exceptionWithName:NSInternalInconsistencyException \ 13 | reason:[NSString stringWithFormat:@"You must override %@ in a subclass.", NSStringFromSelector(_cmd)] \ 14 | userInfo:nil] 15 | 16 | @implementation MASConstraint 17 | 18 | #pragma mark - Init 19 | 20 | - (id)init { 21 | NSAssert(![self isMemberOfClass:[MASConstraint class]], @"MASConstraint is an abstract class, you should not instantiate it directly."); 22 | return [super init]; 23 | } 24 | 25 | #pragma mark - NSLayoutRelation proxies 26 | 27 | - (MASConstraint * (^)(id))equalTo { 28 | return ^id(id attribute) { 29 | return self.equalToWithRelation(attribute, NSLayoutRelationEqual); 30 | }; 31 | } 32 | 33 | - (MASConstraint * (^)(id))mas_equalTo { 34 | return ^id(id attribute) { 35 | return self.equalToWithRelation(attribute, NSLayoutRelationEqual); 36 | }; 37 | } 38 | 39 | - (MASConstraint * (^)(id))greaterThanOrEqualTo { 40 | return ^id(id attribute) { 41 | return self.equalToWithRelation(attribute, NSLayoutRelationGreaterThanOrEqual); 42 | }; 43 | } 44 | 45 | - (MASConstraint * (^)(id))mas_greaterThanOrEqualTo { 46 | return ^id(id attribute) { 47 | return self.equalToWithRelation(attribute, NSLayoutRelationGreaterThanOrEqual); 48 | }; 49 | } 50 | 51 | - (MASConstraint * (^)(id))lessThanOrEqualTo { 52 | return ^id(id attribute) { 53 | return self.equalToWithRelation(attribute, NSLayoutRelationLessThanOrEqual); 54 | }; 55 | } 56 | 57 | - (MASConstraint * (^)(id))mas_lessThanOrEqualTo { 58 | return ^id(id attribute) { 59 | return self.equalToWithRelation(attribute, NSLayoutRelationLessThanOrEqual); 60 | }; 61 | } 62 | 63 | #pragma mark - MASLayoutPriority proxies 64 | 65 | - (MASConstraint * (^)())priorityLow { 66 | return ^id{ 67 | self.priority(MASLayoutPriorityDefaultLow); 68 | return self; 69 | }; 70 | } 71 | 72 | - (MASConstraint * (^)())priorityMedium { 73 | return ^id{ 74 | self.priority(MASLayoutPriorityDefaultMedium); 75 | return self; 76 | }; 77 | } 78 | 79 | - (MASConstraint * (^)())priorityHigh { 80 | return ^id{ 81 | self.priority(MASLayoutPriorityDefaultHigh); 82 | return self; 83 | }; 84 | } 85 | 86 | #pragma mark - NSLayoutConstraint constant proxies 87 | 88 | - (MASConstraint * (^)(MASEdgeInsets))insets { 89 | return ^id(MASEdgeInsets insets){ 90 | self.insets = insets; 91 | return self; 92 | }; 93 | } 94 | 95 | - (MASConstraint * (^)(CGSize))sizeOffset { 96 | return ^id(CGSize offset) { 97 | self.sizeOffset = offset; 98 | return self; 99 | }; 100 | } 101 | 102 | - (MASConstraint * (^)(CGPoint))centerOffset { 103 | return ^id(CGPoint offset) { 104 | self.centerOffset = offset; 105 | return self; 106 | }; 107 | } 108 | 109 | - (MASConstraint * (^)(CGFloat))offset { 110 | return ^id(CGFloat offset){ 111 | self.offset = offset; 112 | return self; 113 | }; 114 | } 115 | 116 | - (MASConstraint * (^)(NSValue *value))valueOffset { 117 | return ^id(NSValue *offset) { 118 | NSAssert([offset isKindOfClass:NSValue.class], @"expected an NSValue offset, got: %@", offset); 119 | [self setLayoutConstantWithValue:offset]; 120 | return self; 121 | }; 122 | } 123 | 124 | - (MASConstraint * (^)(id offset))mas_offset { 125 | // Will never be called due to macro 126 | return nil; 127 | } 128 | 129 | #pragma mark - NSLayoutConstraint constant setter 130 | 131 | - (void)setLayoutConstantWithValue:(NSValue *)value { 132 | if ([value isKindOfClass:NSNumber.class]) { 133 | self.offset = [(NSNumber *)value doubleValue]; 134 | } else if (strcmp(value.objCType, @encode(CGPoint)) == 0) { 135 | CGPoint point; 136 | [value getValue:&point]; 137 | self.centerOffset = point; 138 | } else if (strcmp(value.objCType, @encode(CGSize)) == 0) { 139 | CGSize size; 140 | [value getValue:&size]; 141 | self.sizeOffset = size; 142 | } else if (strcmp(value.objCType, @encode(MASEdgeInsets)) == 0) { 143 | MASEdgeInsets insets; 144 | [value getValue:&insets]; 145 | self.insets = insets; 146 | } else { 147 | NSAssert(NO, @"attempting to set layout constant with unsupported value: %@", value); 148 | } 149 | } 150 | 151 | #pragma mark - Semantic properties 152 | 153 | - (MASConstraint *)with { 154 | return self; 155 | } 156 | 157 | - (MASConstraint *)and { 158 | return self; 159 | } 160 | 161 | #pragma mark - Chaining 162 | 163 | - (MASConstraint *)addConstraintWithLayoutAttribute:(NSLayoutAttribute __unused)layoutAttribute { 164 | MASMethodNotImplemented(); 165 | } 166 | 167 | - (MASConstraint *)left { 168 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeft]; 169 | } 170 | 171 | - (MASConstraint *)top { 172 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTop]; 173 | } 174 | 175 | - (MASConstraint *)right { 176 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRight]; 177 | } 178 | 179 | - (MASConstraint *)bottom { 180 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottom]; 181 | } 182 | 183 | - (MASConstraint *)leading { 184 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeading]; 185 | } 186 | 187 | - (MASConstraint *)trailing { 188 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailing]; 189 | } 190 | 191 | - (MASConstraint *)width { 192 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeWidth]; 193 | } 194 | 195 | - (MASConstraint *)height { 196 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeHeight]; 197 | } 198 | 199 | - (MASConstraint *)centerX { 200 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterX]; 201 | } 202 | 203 | - (MASConstraint *)centerY { 204 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterY]; 205 | } 206 | 207 | - (MASConstraint *)baseline { 208 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBaseline]; 209 | } 210 | 211 | #if TARGET_OS_IPHONE 212 | 213 | - (MASConstraint *)leftMargin { 214 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeftMargin]; 215 | } 216 | 217 | - (MASConstraint *)rightMargin { 218 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeRightMargin]; 219 | } 220 | 221 | - (MASConstraint *)topMargin { 222 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTopMargin]; 223 | } 224 | 225 | - (MASConstraint *)bottomMargin { 226 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeBottomMargin]; 227 | } 228 | 229 | - (MASConstraint *)leadingMargin { 230 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeLeadingMargin]; 231 | } 232 | 233 | - (MASConstraint *)trailingMargin { 234 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeTrailingMargin]; 235 | } 236 | 237 | - (MASConstraint *)centerXWithinMargins { 238 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterXWithinMargins]; 239 | } 240 | 241 | - (MASConstraint *)centerYWithinMargins { 242 | return [self addConstraintWithLayoutAttribute:NSLayoutAttributeCenterYWithinMargins]; 243 | } 244 | 245 | #endif 246 | 247 | #pragma mark - Abstract 248 | 249 | - (MASConstraint * (^)(CGFloat multiplier))multipliedBy { MASMethodNotImplemented(); } 250 | 251 | - (MASConstraint * (^)(CGFloat divider))dividedBy { MASMethodNotImplemented(); } 252 | 253 | - (MASConstraint * (^)(MASLayoutPriority priority))priority { MASMethodNotImplemented(); } 254 | 255 | - (MASConstraint * (^)(id, NSLayoutRelation))equalToWithRelation { MASMethodNotImplemented(); } 256 | 257 | - (MASConstraint * (^)(id key))key { MASMethodNotImplemented(); } 258 | 259 | - (void)setInsets:(MASEdgeInsets __unused)insets { MASMethodNotImplemented(); } 260 | 261 | - (void)setSizeOffset:(CGSize __unused)sizeOffset { MASMethodNotImplemented(); } 262 | 263 | - (void)setCenterOffset:(CGPoint __unused)centerOffset { MASMethodNotImplemented(); } 264 | 265 | - (void)setOffset:(CGFloat __unused)offset { MASMethodNotImplemented(); } 266 | 267 | #if TARGET_OS_MAC && !TARGET_OS_IPHONE 268 | 269 | - (MASConstraint *)animator { MASMethodNotImplemented(); } 270 | 271 | #endif 272 | 273 | - (void)activate { MASMethodNotImplemented(); } 274 | 275 | - (void)deactivate { MASMethodNotImplemented(); } 276 | 277 | - (void)install { MASMethodNotImplemented(); } 278 | 279 | - (void)uninstall { MASMethodNotImplemented(); } 280 | 281 | @end 282 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/MASConstraintMaker.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraintBuilder.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASConstraint.h" 10 | #import "MASUtilities.h" 11 | 12 | typedef NS_OPTIONS(NSInteger, MASAttribute) { 13 | MASAttributeLeft = 1 << NSLayoutAttributeLeft, 14 | MASAttributeRight = 1 << NSLayoutAttributeRight, 15 | MASAttributeTop = 1 << NSLayoutAttributeTop, 16 | MASAttributeBottom = 1 << NSLayoutAttributeBottom, 17 | MASAttributeLeading = 1 << NSLayoutAttributeLeading, 18 | MASAttributeTrailing = 1 << NSLayoutAttributeTrailing, 19 | MASAttributeWidth = 1 << NSLayoutAttributeWidth, 20 | MASAttributeHeight = 1 << NSLayoutAttributeHeight, 21 | MASAttributeCenterX = 1 << NSLayoutAttributeCenterX, 22 | MASAttributeCenterY = 1 << NSLayoutAttributeCenterY, 23 | MASAttributeBaseline = 1 << NSLayoutAttributeBaseline, 24 | 25 | #if TARGET_OS_IPHONE 26 | 27 | MASAttributeLeftMargin = 1 << NSLayoutAttributeLeftMargin, 28 | MASAttributeRightMargin = 1 << NSLayoutAttributeRightMargin, 29 | MASAttributeTopMargin = 1 << NSLayoutAttributeTopMargin, 30 | MASAttributeBottomMargin = 1 << NSLayoutAttributeBottomMargin, 31 | MASAttributeLeadingMargin = 1 << NSLayoutAttributeLeadingMargin, 32 | MASAttributeTrailingMargin = 1 << NSLayoutAttributeTrailingMargin, 33 | MASAttributeCenterXWithinMargins = 1 << NSLayoutAttributeCenterXWithinMargins, 34 | MASAttributeCenterYWithinMargins = 1 << NSLayoutAttributeCenterYWithinMargins, 35 | 36 | #endif 37 | 38 | }; 39 | 40 | /** 41 | * Provides factory methods for creating MASConstraints. 42 | * Constraints are collected until they are ready to be installed 43 | * 44 | */ 45 | @interface MASConstraintMaker : NSObject 46 | 47 | /** 48 | * The following properties return a new MASViewConstraint 49 | * with the first item set to the makers associated view and the appropriate MASViewAttribute 50 | */ 51 | @property (nonatomic, strong, readonly) MASConstraint *left; 52 | @property (nonatomic, strong, readonly) MASConstraint *top; 53 | @property (nonatomic, strong, readonly) MASConstraint *right; 54 | @property (nonatomic, strong, readonly) MASConstraint *bottom; 55 | @property (nonatomic, strong, readonly) MASConstraint *leading; 56 | @property (nonatomic, strong, readonly) MASConstraint *trailing; 57 | @property (nonatomic, strong, readonly) MASConstraint *width; 58 | @property (nonatomic, strong, readonly) MASConstraint *height; 59 | @property (nonatomic, strong, readonly) MASConstraint *centerX; 60 | @property (nonatomic, strong, readonly) MASConstraint *centerY; 61 | @property (nonatomic, strong, readonly) MASConstraint *baseline; 62 | 63 | #if TARGET_OS_IPHONE 64 | 65 | @property (nonatomic, strong, readonly) MASConstraint *leftMargin; 66 | @property (nonatomic, strong, readonly) MASConstraint *rightMargin; 67 | @property (nonatomic, strong, readonly) MASConstraint *topMargin; 68 | @property (nonatomic, strong, readonly) MASConstraint *bottomMargin; 69 | @property (nonatomic, strong, readonly) MASConstraint *leadingMargin; 70 | @property (nonatomic, strong, readonly) MASConstraint *trailingMargin; 71 | @property (nonatomic, strong, readonly) MASConstraint *centerXWithinMargins; 72 | @property (nonatomic, strong, readonly) MASConstraint *centerYWithinMargins; 73 | 74 | #endif 75 | 76 | /** 77 | * Returns a block which creates a new MASCompositeConstraint with the first item set 78 | * to the makers associated view and children corresponding to the set bits in the 79 | * MASAttribute parameter. Combine multiple attributes via binary-or. 80 | */ 81 | @property (nonatomic, strong, readonly) MASConstraint *(^attributes)(MASAttribute attrs); 82 | 83 | /** 84 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeEdges 85 | * which generates the appropriate MASViewConstraint children (top, left, bottom, right) 86 | * with the first item set to the makers associated view 87 | */ 88 | @property (nonatomic, strong, readonly) MASConstraint *edges; 89 | 90 | /** 91 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeSize 92 | * which generates the appropriate MASViewConstraint children (width, height) 93 | * with the first item set to the makers associated view 94 | */ 95 | @property (nonatomic, strong, readonly) MASConstraint *size; 96 | 97 | /** 98 | * Creates a MASCompositeConstraint with type MASCompositeConstraintTypeCenter 99 | * which generates the appropriate MASViewConstraint children (centerX, centerY) 100 | * with the first item set to the makers associated view 101 | */ 102 | @property (nonatomic, strong, readonly) MASConstraint *center; 103 | 104 | /** 105 | * Whether or not to check for an existing constraint instead of adding constraint 106 | */ 107 | @property (nonatomic, assign) BOOL updateExisting; 108 | 109 | /** 110 | * Whether or not to remove existing constraints prior to installing 111 | */ 112 | @property (nonatomic, assign) BOOL removeExisting; 113 | 114 | /** 115 | * initialises the maker with a default view 116 | * 117 | * @param view any MASConstrait are created with this view as the first item 118 | * 119 | * @return a new MASConstraintMaker 120 | */ 121 | - (id)initWithView:(MAS_VIEW *)view; 122 | 123 | /** 124 | * Calls install method on any MASConstraints which have been created by this maker 125 | * 126 | * @return an array of all the installed MASConstraints 127 | */ 128 | - (NSArray *)install; 129 | 130 | - (MASConstraint * (^)(dispatch_block_t))group; 131 | 132 | @end 133 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/MASLayoutConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASLayoutConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * When you are debugging or printing the constraints attached to a view this subclass 13 | * makes it easier to identify which constraints have been created via Masonry 14 | */ 15 | @interface MASLayoutConstraint : NSLayoutConstraint 16 | 17 | /** 18 | * a key to associate with this constraint 19 | */ 20 | @property (nonatomic, strong) id mas_key; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/MASLayoutConstraint.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASLayoutConstraint.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASLayoutConstraint.h" 10 | 11 | @implementation MASLayoutConstraint 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/MASUtilities.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASUtilities.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 19/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #if TARGET_OS_IPHONE 12 | 13 | #import 14 | #define MAS_VIEW UIView 15 | #define MAS_VIEW_CONTROLLER UIViewController 16 | #define MASEdgeInsets UIEdgeInsets 17 | 18 | typedef UILayoutPriority MASLayoutPriority; 19 | static const MASLayoutPriority MASLayoutPriorityRequired = UILayoutPriorityRequired; 20 | static const MASLayoutPriority MASLayoutPriorityDefaultHigh = UILayoutPriorityDefaultHigh; 21 | static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 500; 22 | static const MASLayoutPriority MASLayoutPriorityDefaultLow = UILayoutPriorityDefaultLow; 23 | static const MASLayoutPriority MASLayoutPriorityFittingSizeLevel = UILayoutPriorityFittingSizeLevel; 24 | 25 | #elif TARGET_OS_MAC 26 | 27 | #import 28 | #define MAS_VIEW NSView 29 | #define MASEdgeInsets NSEdgeInsets 30 | 31 | typedef NSLayoutPriority MASLayoutPriority; 32 | static const MASLayoutPriority MASLayoutPriorityRequired = NSLayoutPriorityRequired; 33 | static const MASLayoutPriority MASLayoutPriorityDefaultHigh = NSLayoutPriorityDefaultHigh; 34 | static const MASLayoutPriority MASLayoutPriorityDragThatCanResizeWindow = NSLayoutPriorityDragThatCanResizeWindow; 35 | static const MASLayoutPriority MASLayoutPriorityDefaultMedium = 501; 36 | static const MASLayoutPriority MASLayoutPriorityWindowSizeStayPut = NSLayoutPriorityWindowSizeStayPut; 37 | static const MASLayoutPriority MASLayoutPriorityDragThatCannotResizeWindow = NSLayoutPriorityDragThatCannotResizeWindow; 38 | static const MASLayoutPriority MASLayoutPriorityDefaultLow = NSLayoutPriorityDefaultLow; 39 | static const MASLayoutPriority MASLayoutPriorityFittingSizeCompression = NSLayoutPriorityFittingSizeCompression; 40 | 41 | #endif 42 | 43 | /** 44 | * Allows you to attach keys to objects matching the variable names passed. 45 | * 46 | * view1.mas_key = @"view1", view2.mas_key = @"view2"; 47 | * 48 | * is equivalent to: 49 | * 50 | * MASAttachKeys(view1, view2); 51 | */ 52 | #define MASAttachKeys(...) \ 53 | NSDictionary *keyPairs = NSDictionaryOfVariableBindings(__VA_ARGS__); \ 54 | for (id key in keyPairs.allKeys) { \ 55 | id obj = keyPairs[key]; \ 56 | NSAssert([obj respondsToSelector:@selector(setMas_key:)], \ 57 | @"Cannot attach mas_key to %@", obj); \ 58 | [obj setMas_key:key]; \ 59 | } 60 | 61 | /** 62 | * Used to create object hashes 63 | * Based on http://www.mikeash.com/pyblog/friday-qa-2010-06-18-implementing-equality-and-hashing.html 64 | */ 65 | #define MAS_NSUINT_BIT (CHAR_BIT * sizeof(NSUInteger)) 66 | #define MAS_NSUINTROTATE(val, howmuch) ((((NSUInteger)val) << howmuch) | (((NSUInteger)val) >> (MAS_NSUINT_BIT - howmuch))) 67 | 68 | /** 69 | * Given a scalar or struct value, wraps it in NSValue 70 | * Based on EXPObjectify: https://github.com/specta/expecta 71 | */ 72 | static inline id _MASBoxValue(const char *type, ...) { 73 | va_list v; 74 | va_start(v, type); 75 | id obj = nil; 76 | if (strcmp(type, @encode(id)) == 0) { 77 | id actual = va_arg(v, id); 78 | obj = actual; 79 | } else if (strcmp(type, @encode(CGPoint)) == 0) { 80 | CGPoint actual = (CGPoint)va_arg(v, CGPoint); 81 | obj = [NSValue value:&actual withObjCType:type]; 82 | } else if (strcmp(type, @encode(CGSize)) == 0) { 83 | CGSize actual = (CGSize)va_arg(v, CGSize); 84 | obj = [NSValue value:&actual withObjCType:type]; 85 | } else if (strcmp(type, @encode(MASEdgeInsets)) == 0) { 86 | MASEdgeInsets actual = (MASEdgeInsets)va_arg(v, MASEdgeInsets); 87 | obj = [NSValue value:&actual withObjCType:type]; 88 | } else if (strcmp(type, @encode(double)) == 0) { 89 | double actual = (double)va_arg(v, double); 90 | obj = [NSNumber numberWithDouble:actual]; 91 | } else if (strcmp(type, @encode(float)) == 0) { 92 | float actual = (float)va_arg(v, double); 93 | obj = [NSNumber numberWithFloat:actual]; 94 | } else if (strcmp(type, @encode(int)) == 0) { 95 | int actual = (int)va_arg(v, int); 96 | obj = [NSNumber numberWithInt:actual]; 97 | } else if (strcmp(type, @encode(long)) == 0) { 98 | long actual = (long)va_arg(v, long); 99 | obj = [NSNumber numberWithLong:actual]; 100 | } else if (strcmp(type, @encode(long long)) == 0) { 101 | long long actual = (long long)va_arg(v, long long); 102 | obj = [NSNumber numberWithLongLong:actual]; 103 | } else if (strcmp(type, @encode(short)) == 0) { 104 | short actual = (short)va_arg(v, int); 105 | obj = [NSNumber numberWithShort:actual]; 106 | } else if (strcmp(type, @encode(char)) == 0) { 107 | char actual = (char)va_arg(v, int); 108 | obj = [NSNumber numberWithChar:actual]; 109 | } else if (strcmp(type, @encode(bool)) == 0) { 110 | bool actual = (bool)va_arg(v, int); 111 | obj = [NSNumber numberWithBool:actual]; 112 | } else if (strcmp(type, @encode(unsigned char)) == 0) { 113 | unsigned char actual = (unsigned char)va_arg(v, unsigned int); 114 | obj = [NSNumber numberWithUnsignedChar:actual]; 115 | } else if (strcmp(type, @encode(unsigned int)) == 0) { 116 | unsigned int actual = (unsigned int)va_arg(v, unsigned int); 117 | obj = [NSNumber numberWithUnsignedInt:actual]; 118 | } else if (strcmp(type, @encode(unsigned long)) == 0) { 119 | unsigned long actual = (unsigned long)va_arg(v, unsigned long); 120 | obj = [NSNumber numberWithUnsignedLong:actual]; 121 | } else if (strcmp(type, @encode(unsigned long long)) == 0) { 122 | unsigned long long actual = (unsigned long long)va_arg(v, unsigned long long); 123 | obj = [NSNumber numberWithUnsignedLongLong:actual]; 124 | } else if (strcmp(type, @encode(unsigned short)) == 0) { 125 | unsigned short actual = (unsigned short)va_arg(v, unsigned int); 126 | obj = [NSNumber numberWithUnsignedShort:actual]; 127 | } 128 | va_end(v); 129 | return obj; 130 | } 131 | 132 | #define MASBoxValue(value) _MASBoxValue(@encode(__typeof__((value))), (value)) 133 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/MASViewAttribute.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASAttribute.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * An immutable tuple which stores the view and the related NSLayoutAttribute. 13 | * Describes part of either the left or right hand side of a constraint equation 14 | */ 15 | @interface MASViewAttribute : NSObject 16 | 17 | /** 18 | * The view which the reciever relates to. Can be nil if item is not a view. 19 | */ 20 | @property (nonatomic, weak, readonly) MAS_VIEW *view; 21 | 22 | /** 23 | * The item which the reciever relates to. 24 | */ 25 | @property (nonatomic, weak, readonly) id item; 26 | 27 | /** 28 | * The attribute which the reciever relates to 29 | */ 30 | @property (nonatomic, assign, readonly) NSLayoutAttribute layoutAttribute; 31 | 32 | /** 33 | * Convenience initializer. 34 | */ 35 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute; 36 | 37 | /** 38 | * The designated initializer. 39 | */ 40 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute; 41 | 42 | /** 43 | * Determine whether the layoutAttribute is a size attribute 44 | * 45 | * @return YES if layoutAttribute is equal to NSLayoutAttributeWidth or NSLayoutAttributeHeight 46 | */ 47 | - (BOOL)isSizeAttribute; 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/MASViewAttribute.m: -------------------------------------------------------------------------------- 1 | // 2 | // MASAttribute.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 21/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASViewAttribute.h" 10 | 11 | @implementation MASViewAttribute 12 | 13 | - (id)initWithView:(MAS_VIEW *)view layoutAttribute:(NSLayoutAttribute)layoutAttribute { 14 | self = [self initWithView:view item:view layoutAttribute:layoutAttribute]; 15 | return self; 16 | } 17 | 18 | - (id)initWithView:(MAS_VIEW *)view item:(id)item layoutAttribute:(NSLayoutAttribute)layoutAttribute { 19 | self = [super init]; 20 | if (!self) return nil; 21 | 22 | _view = view; 23 | _item = item; 24 | _layoutAttribute = layoutAttribute; 25 | 26 | return self; 27 | } 28 | 29 | - (BOOL)isSizeAttribute { 30 | return self.layoutAttribute == NSLayoutAttributeWidth 31 | || self.layoutAttribute == NSLayoutAttributeHeight; 32 | } 33 | 34 | - (BOOL)isEqual:(MASViewAttribute *)viewAttribute { 35 | if ([viewAttribute isKindOfClass:self.class]) { 36 | return self.view == viewAttribute.view 37 | && self.layoutAttribute == viewAttribute.layoutAttribute; 38 | } 39 | return [super isEqual:viewAttribute]; 40 | } 41 | 42 | - (NSUInteger)hash { 43 | return MAS_NSUINTROTATE([self.view hash], MAS_NSUINT_BIT / 2) ^ self.layoutAttribute; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/MASViewConstraint.h: -------------------------------------------------------------------------------- 1 | // 2 | // MASConstraint.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASViewAttribute.h" 10 | #import "MASConstraint.h" 11 | #import "MASLayoutConstraint.h" 12 | #import "MASUtilities.h" 13 | 14 | /** 15 | * A single constraint. 16 | * Contains the attributes neccessary for creating a NSLayoutConstraint and adding it to the appropriate view 17 | */ 18 | @interface MASViewConstraint : MASConstraint 19 | 20 | /** 21 | * First item/view and first attribute of the NSLayoutConstraint 22 | */ 23 | @property (nonatomic, strong, readonly) MASViewAttribute *firstViewAttribute; 24 | 25 | /** 26 | * Second item/view and second attribute of the NSLayoutConstraint 27 | */ 28 | @property (nonatomic, strong, readonly) MASViewAttribute *secondViewAttribute; 29 | 30 | /** 31 | * initialises the MASViewConstraint with the first part of the equation 32 | * 33 | * @param firstViewAttribute view.mas_left, view.mas_width etc. 34 | * 35 | * @return a new view constraint 36 | */ 37 | - (id)initWithFirstViewAttribute:(MASViewAttribute *)firstViewAttribute; 38 | 39 | /** 40 | * Returns all MASViewConstraints installed with this view as a first item. 41 | * 42 | * @param view A view to retrieve constraints for. 43 | * 44 | * @return An array of MASViewConstraints. 45 | */ 46 | + (NSArray *)installedConstraintsForView:(MAS_VIEW *)view; 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/Masonry.h: -------------------------------------------------------------------------------- 1 | // 2 | // Masonry.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Masonry. 12 | FOUNDATION_EXPORT double MasonryVersionNumber; 13 | 14 | //! Project version string for Masonry. 15 | FOUNDATION_EXPORT const unsigned char MasonryVersionString[]; 16 | 17 | #import "MASUtilities.h" 18 | #import "View+MASAdditions.h" 19 | #import "View+MASShorthandAdditions.h" 20 | #import "ViewController+MASAdditions.h" 21 | #import "NSArray+MASAdditions.h" 22 | #import "NSArray+MASShorthandAdditions.h" 23 | #import "MASConstraint.h" 24 | #import "MASCompositeConstraint.h" 25 | #import "MASViewAttribute.h" 26 | #import "MASViewConstraint.h" 27 | #import "MASConstraintMaker.h" 28 | #import "MASLayoutConstraint.h" 29 | #import "NSLayoutConstraint+MASDebugAdditions.h" 30 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/NSArray+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASAdditions.h 3 | // 4 | // 5 | // Created by Daniel Hammond on 11/26/13. 6 | // 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | @interface NSArray (MASAdditions) 14 | 15 | /** 16 | * Creates a MASConstraintMaker with each view in the callee. 17 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing on each view 18 | * 19 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 20 | * 21 | * @return Array of created MASConstraints 22 | */ 23 | - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block; 24 | 25 | /** 26 | * Creates a MASConstraintMaker with each view in the callee. 27 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. 28 | * If an existing constraint exists then it will be updated instead. 29 | * 30 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 31 | * 32 | * @return Array of created/updated MASConstraints 33 | */ 34 | - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block; 35 | 36 | /** 37 | * Creates a MASConstraintMaker with each view in the callee. 38 | * Any constraints defined are added to each view or the appropriate superview once the block has finished executing on each view. 39 | * All constraints previously installed for the views will be removed. 40 | * 41 | * @param block scope within which you can build up the constraints which you wish to apply to each view. 42 | * 43 | * @return Array of created/updated MASConstraints 44 | */ 45 | - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/NSArray+MASAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASAdditions.m 3 | // 4 | // 5 | // Created by Daniel Hammond on 11/26/13. 6 | // 7 | // 8 | 9 | #import "NSArray+MASAdditions.h" 10 | #import "View+MASAdditions.h" 11 | 12 | @implementation NSArray (MASAdditions) 13 | 14 | - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block { 15 | NSMutableArray *constraints = [NSMutableArray array]; 16 | for (MAS_VIEW *view in self) { 17 | NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views"); 18 | [constraints addObjectsFromArray:[view mas_makeConstraints:block]]; 19 | } 20 | return constraints; 21 | } 22 | 23 | - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block { 24 | NSMutableArray *constraints = [NSMutableArray array]; 25 | for (MAS_VIEW *view in self) { 26 | NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views"); 27 | [constraints addObjectsFromArray:[view mas_updateConstraints:block]]; 28 | } 29 | return constraints; 30 | } 31 | 32 | - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block { 33 | NSMutableArray *constraints = [NSMutableArray array]; 34 | for (MAS_VIEW *view in self) { 35 | NSAssert([view isKindOfClass:[MAS_VIEW class]], @"All objects in the array must be views"); 36 | [constraints addObjectsFromArray:[view mas_remakeConstraints:block]]; 37 | } 38 | return constraints; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/NSArray+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MASShorthandAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 22/07/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "NSArray+MASAdditions.h" 10 | 11 | #ifdef MAS_SHORTHAND 12 | 13 | /** 14 | * Shorthand array additions without the 'mas_' prefixes, 15 | * only enabled if MAS_SHORTHAND is defined 16 | */ 17 | @interface NSArray (MASShorthandAdditions) 18 | 19 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; 20 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; 21 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; 22 | 23 | @end 24 | 25 | @implementation NSArray (MASShorthandAdditions) 26 | 27 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { 28 | return [self mas_makeConstraints:block]; 29 | } 30 | 31 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { 32 | return [self mas_updateConstraints:block]; 33 | } 34 | 35 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { 36 | return [self mas_remakeConstraints:block]; 37 | } 38 | 39 | @end 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/NSLayoutConstraint+MASDebugAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSLayoutConstraint+MASDebugAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | 11 | /** 12 | * makes debug and log output of NSLayoutConstraints more readable 13 | */ 14 | @interface NSLayoutConstraint (MASDebugAdditions) 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/NSLayoutConstraint+MASDebugAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSLayoutConstraint+MASDebugAdditions.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 3/08/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "NSLayoutConstraint+MASDebugAdditions.h" 10 | #import "MASConstraint.h" 11 | #import "MASLayoutConstraint.h" 12 | 13 | @implementation NSLayoutConstraint (MASDebugAdditions) 14 | 15 | #pragma mark - description maps 16 | 17 | + (NSDictionary *)layoutRelationDescriptionsByValue { 18 | static dispatch_once_t once; 19 | static NSDictionary *descriptionMap; 20 | dispatch_once(&once, ^{ 21 | descriptionMap = @{ 22 | @(NSLayoutRelationEqual) : @"==", 23 | @(NSLayoutRelationGreaterThanOrEqual) : @">=", 24 | @(NSLayoutRelationLessThanOrEqual) : @"<=", 25 | }; 26 | }); 27 | return descriptionMap; 28 | } 29 | 30 | + (NSDictionary *)layoutAttributeDescriptionsByValue { 31 | static dispatch_once_t once; 32 | static NSDictionary *descriptionMap; 33 | dispatch_once(&once, ^{ 34 | descriptionMap = @{ 35 | @(NSLayoutAttributeTop) : @"top", 36 | @(NSLayoutAttributeLeft) : @"left", 37 | @(NSLayoutAttributeBottom) : @"bottom", 38 | @(NSLayoutAttributeRight) : @"right", 39 | @(NSLayoutAttributeLeading) : @"leading", 40 | @(NSLayoutAttributeTrailing) : @"trailing", 41 | @(NSLayoutAttributeWidth) : @"width", 42 | @(NSLayoutAttributeHeight) : @"height", 43 | @(NSLayoutAttributeCenterX) : @"centerX", 44 | @(NSLayoutAttributeCenterY) : @"centerY", 45 | @(NSLayoutAttributeBaseline) : @"baseline", 46 | 47 | #if TARGET_OS_IPHONE 48 | @(NSLayoutAttributeLeftMargin) : @"leftMargin", 49 | @(NSLayoutAttributeRightMargin) : @"rightMargin", 50 | @(NSLayoutAttributeTopMargin) : @"topMargin", 51 | @(NSLayoutAttributeBottomMargin) : @"bottomMargin", 52 | @(NSLayoutAttributeLeadingMargin) : @"leadingMargin", 53 | @(NSLayoutAttributeTrailingMargin) : @"trailingMargin", 54 | @(NSLayoutAttributeCenterXWithinMargins) : @"centerXWithinMargins", 55 | @(NSLayoutAttributeCenterYWithinMargins) : @"centerYWithinMargins", 56 | #endif 57 | 58 | }; 59 | 60 | }); 61 | return descriptionMap; 62 | } 63 | 64 | 65 | + (NSDictionary *)layoutPriorityDescriptionsByValue { 66 | static dispatch_once_t once; 67 | static NSDictionary *descriptionMap; 68 | dispatch_once(&once, ^{ 69 | #if TARGET_OS_IPHONE 70 | descriptionMap = @{ 71 | @(MASLayoutPriorityDefaultHigh) : @"high", 72 | @(MASLayoutPriorityDefaultLow) : @"low", 73 | @(MASLayoutPriorityDefaultMedium) : @"medium", 74 | @(MASLayoutPriorityRequired) : @"required", 75 | @(MASLayoutPriorityFittingSizeLevel) : @"fitting size", 76 | }; 77 | #elif TARGET_OS_MAC 78 | descriptionMap = @{ 79 | @(MASLayoutPriorityDefaultHigh) : @"high", 80 | @(MASLayoutPriorityDragThatCanResizeWindow) : @"drag can resize window", 81 | @(MASLayoutPriorityDefaultMedium) : @"medium", 82 | @(MASLayoutPriorityWindowSizeStayPut) : @"window size stay put", 83 | @(MASLayoutPriorityDragThatCannotResizeWindow) : @"drag cannot resize window", 84 | @(MASLayoutPriorityDefaultLow) : @"low", 85 | @(MASLayoutPriorityFittingSizeCompression) : @"fitting size", 86 | @(MASLayoutPriorityRequired) : @"required", 87 | }; 88 | #endif 89 | }); 90 | return descriptionMap; 91 | } 92 | 93 | #pragma mark - description override 94 | 95 | + (NSString *)descriptionForObject:(id)obj { 96 | if ([obj respondsToSelector:@selector(mas_key)] && [obj mas_key]) { 97 | return [NSString stringWithFormat:@"%@:%@", [obj class], [obj mas_key]]; 98 | } 99 | return [NSString stringWithFormat:@"%@:%p", [obj class], obj]; 100 | } 101 | 102 | - (NSString *)description { 103 | NSMutableString *description = [[NSMutableString alloc] initWithString:@"<"]; 104 | 105 | [description appendString:[self.class descriptionForObject:self]]; 106 | 107 | [description appendFormat:@" %@", [self.class descriptionForObject:self.firstItem]]; 108 | if (self.firstAttribute != NSLayoutAttributeNotAnAttribute) { 109 | [description appendFormat:@".%@", [self.class.layoutAttributeDescriptionsByValue objectForKey:@(self.firstAttribute)]]; 110 | } 111 | 112 | [description appendFormat:@" %@", [self.class.layoutRelationDescriptionsByValue objectForKey:@(self.relation)]]; 113 | 114 | if (self.secondItem) { 115 | [description appendFormat:@" %@", [self.class descriptionForObject:self.secondItem]]; 116 | } 117 | if (self.secondAttribute != NSLayoutAttributeNotAnAttribute) { 118 | [description appendFormat:@".%@", [self.class.layoutAttributeDescriptionsByValue objectForKey:@(self.secondAttribute)]]; 119 | } 120 | 121 | if (self.multiplier != 1) { 122 | [description appendFormat:@" * %g", self.multiplier]; 123 | } 124 | 125 | if (self.secondAttribute == NSLayoutAttributeNotAnAttribute) { 126 | [description appendFormat:@" %g", self.constant]; 127 | } else { 128 | if (self.constant) { 129 | [description appendFormat:@" %@ %g", (self.constant < 0 ? @"-" : @"+"), ABS(self.constant)]; 130 | } 131 | } 132 | 133 | if (self.priority != MASLayoutPriorityRequired) { 134 | [description appendFormat:@" ^%@", [self.class.layoutPriorityDescriptionsByValue objectForKey:@(self.priority)] ?: [NSNumber numberWithDouble:self.priority]]; 135 | } 136 | 137 | [description appendString:@">"]; 138 | return description; 139 | } 140 | 141 | @end 142 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/View+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MASAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | /** 14 | * Provides constraint maker block 15 | * and convience methods for creating MASViewAttribute which are view + NSLayoutAttribute pairs 16 | */ 17 | @interface MAS_VIEW (MASAdditions) 18 | 19 | /** 20 | * following properties return a new MASViewAttribute with current view and appropriate NSLayoutAttribute 21 | */ 22 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_left; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_top; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_right; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottom; 26 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leading; 27 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailing; 28 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_width; 29 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_height; 30 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerX; 31 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerY; 32 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_baseline; 33 | @property (nonatomic, strong, readonly) MASViewAttribute *(^mas_attribute)(NSLayoutAttribute attr); 34 | 35 | #if TARGET_OS_IPHONE 36 | 37 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leftMargin; 38 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_rightMargin; 39 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topMargin; 40 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomMargin; 41 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_leadingMargin; 42 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_trailingMargin; 43 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerXWithinMargins; 44 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_centerYWithinMargins; 45 | 46 | #endif 47 | 48 | /** 49 | * a key to associate with this view 50 | */ 51 | @property (nonatomic, strong) id mas_key; 52 | 53 | /** 54 | * Finds the closest common superview between this view and another view 55 | * 56 | * @param view other view 57 | * 58 | * @return returns nil if common superview could not be found 59 | */ 60 | - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view; 61 | 62 | /** 63 | * Creates a MASConstraintMaker with the callee view. 64 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing 65 | * 66 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 67 | * 68 | * @return Array of created MASConstraints 69 | */ 70 | - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *make))block; 71 | 72 | /** 73 | * Creates a MASConstraintMaker with the callee view. 74 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. 75 | * If an existing constraint exists then it will be updated instead. 76 | * 77 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 78 | * 79 | * @return Array of created/updated MASConstraints 80 | */ 81 | - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *make))block; 82 | 83 | /** 84 | * Creates a MASConstraintMaker with the callee view. 85 | * Any constraints defined are added to the view or the appropriate superview once the block has finished executing. 86 | * All constraints previously installed for the view will be removed. 87 | * 88 | * @param block scope within which you can build up the constraints which you wish to apply to the view. 89 | * 90 | * @return Array of created/updated MASConstraints 91 | */ 92 | - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block; 93 | 94 | @end 95 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/View+MASAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MASAdditions.m 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 20/07/13. 6 | // Copyright (c) 2013 cloudling. All rights reserved. 7 | // 8 | 9 | #import "View+MASAdditions.h" 10 | #import 11 | 12 | @implementation MAS_VIEW (MASAdditions) 13 | 14 | - (NSArray *)mas_makeConstraints:(void(^)(MASConstraintMaker *))block { 15 | self.translatesAutoresizingMaskIntoConstraints = NO; 16 | MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; 17 | block(constraintMaker); 18 | return [constraintMaker install]; 19 | } 20 | 21 | - (NSArray *)mas_updateConstraints:(void(^)(MASConstraintMaker *))block { 22 | self.translatesAutoresizingMaskIntoConstraints = NO; 23 | MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; 24 | constraintMaker.updateExisting = YES; 25 | block(constraintMaker); 26 | return [constraintMaker install]; 27 | } 28 | 29 | - (NSArray *)mas_remakeConstraints:(void(^)(MASConstraintMaker *make))block { 30 | self.translatesAutoresizingMaskIntoConstraints = NO; 31 | MASConstraintMaker *constraintMaker = [[MASConstraintMaker alloc] initWithView:self]; 32 | constraintMaker.removeExisting = YES; 33 | block(constraintMaker); 34 | return [constraintMaker install]; 35 | } 36 | 37 | #pragma mark - NSLayoutAttribute properties 38 | 39 | - (MASViewAttribute *)mas_left { 40 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeft]; 41 | } 42 | 43 | - (MASViewAttribute *)mas_top { 44 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTop]; 45 | } 46 | 47 | - (MASViewAttribute *)mas_right { 48 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRight]; 49 | } 50 | 51 | - (MASViewAttribute *)mas_bottom { 52 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottom]; 53 | } 54 | 55 | - (MASViewAttribute *)mas_leading { 56 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeading]; 57 | } 58 | 59 | - (MASViewAttribute *)mas_trailing { 60 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailing]; 61 | } 62 | 63 | - (MASViewAttribute *)mas_width { 64 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeWidth]; 65 | } 66 | 67 | - (MASViewAttribute *)mas_height { 68 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeHeight]; 69 | } 70 | 71 | - (MASViewAttribute *)mas_centerX { 72 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterX]; 73 | } 74 | 75 | - (MASViewAttribute *)mas_centerY { 76 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterY]; 77 | } 78 | 79 | - (MASViewAttribute *)mas_baseline { 80 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBaseline]; 81 | } 82 | 83 | - (MASViewAttribute *(^)(NSLayoutAttribute))mas_attribute 84 | { 85 | return ^(NSLayoutAttribute attr) { 86 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:attr]; 87 | }; 88 | } 89 | 90 | #if TARGET_OS_IPHONE 91 | 92 | - (MASViewAttribute *)mas_leftMargin { 93 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeftMargin]; 94 | } 95 | 96 | - (MASViewAttribute *)mas_rightMargin { 97 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeRightMargin]; 98 | } 99 | 100 | - (MASViewAttribute *)mas_topMargin { 101 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTopMargin]; 102 | } 103 | 104 | - (MASViewAttribute *)mas_bottomMargin { 105 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeBottomMargin]; 106 | } 107 | 108 | - (MASViewAttribute *)mas_leadingMargin { 109 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeLeadingMargin]; 110 | } 111 | 112 | - (MASViewAttribute *)mas_trailingMargin { 113 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeTrailingMargin]; 114 | } 115 | 116 | - (MASViewAttribute *)mas_centerXWithinMargins { 117 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterXWithinMargins]; 118 | } 119 | 120 | - (MASViewAttribute *)mas_centerYWithinMargins { 121 | return [[MASViewAttribute alloc] initWithView:self layoutAttribute:NSLayoutAttributeCenterYWithinMargins]; 122 | } 123 | 124 | #endif 125 | 126 | #pragma mark - associated properties 127 | 128 | - (id)mas_key { 129 | return objc_getAssociatedObject(self, @selector(mas_key)); 130 | } 131 | 132 | - (void)setMas_key:(id)key { 133 | objc_setAssociatedObject(self, @selector(mas_key), key, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 134 | } 135 | 136 | #pragma mark - heirachy 137 | 138 | - (instancetype)mas_closestCommonSuperview:(MAS_VIEW *)view { 139 | MAS_VIEW *closestCommonSuperview = nil; 140 | 141 | MAS_VIEW *secondViewSuperview = view; 142 | while (!closestCommonSuperview && secondViewSuperview) { 143 | MAS_VIEW *firstViewSuperview = self; 144 | while (!closestCommonSuperview && firstViewSuperview) { 145 | if (secondViewSuperview == firstViewSuperview) { 146 | closestCommonSuperview = secondViewSuperview; 147 | } 148 | firstViewSuperview = firstViewSuperview.superview; 149 | } 150 | secondViewSuperview = secondViewSuperview.superview; 151 | } 152 | return closestCommonSuperview; 153 | } 154 | 155 | @end 156 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/View+MASShorthandAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+MASShorthandAdditions.h 3 | // Masonry 4 | // 5 | // Created by Jonas Budelmann on 22/07/13. 6 | // Copyright (c) 2013 Jonas Budelmann. All rights reserved. 7 | // 8 | 9 | #import "View+MASAdditions.h" 10 | 11 | #ifdef MAS_SHORTHAND 12 | 13 | /** 14 | * Shorthand view additions without the 'mas_' prefixes, 15 | * only enabled if MAS_SHORTHAND is defined 16 | */ 17 | @interface MAS_VIEW (MASShorthandAdditions) 18 | 19 | @property (nonatomic, strong, readonly) MASViewAttribute *left; 20 | @property (nonatomic, strong, readonly) MASViewAttribute *top; 21 | @property (nonatomic, strong, readonly) MASViewAttribute *right; 22 | @property (nonatomic, strong, readonly) MASViewAttribute *bottom; 23 | @property (nonatomic, strong, readonly) MASViewAttribute *leading; 24 | @property (nonatomic, strong, readonly) MASViewAttribute *trailing; 25 | @property (nonatomic, strong, readonly) MASViewAttribute *width; 26 | @property (nonatomic, strong, readonly) MASViewAttribute *height; 27 | @property (nonatomic, strong, readonly) MASViewAttribute *centerX; 28 | @property (nonatomic, strong, readonly) MASViewAttribute *centerY; 29 | @property (nonatomic, strong, readonly) MASViewAttribute *baseline; 30 | @property (nonatomic, strong, readonly) MASViewAttribute *(^attribute)(NSLayoutAttribute attr); 31 | 32 | #if TARGET_OS_IPHONE 33 | 34 | @property (nonatomic, strong, readonly) MASViewAttribute *leftMargin; 35 | @property (nonatomic, strong, readonly) MASViewAttribute *rightMargin; 36 | @property (nonatomic, strong, readonly) MASViewAttribute *topMargin; 37 | @property (nonatomic, strong, readonly) MASViewAttribute *bottomMargin; 38 | @property (nonatomic, strong, readonly) MASViewAttribute *leadingMargin; 39 | @property (nonatomic, strong, readonly) MASViewAttribute *trailingMargin; 40 | @property (nonatomic, strong, readonly) MASViewAttribute *centerXWithinMargins; 41 | @property (nonatomic, strong, readonly) MASViewAttribute *centerYWithinMargins; 42 | 43 | #endif 44 | 45 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *make))block; 46 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *make))block; 47 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *make))block; 48 | 49 | @end 50 | 51 | #define MAS_ATTR_FORWARD(attr) \ 52 | - (MASViewAttribute *)attr { \ 53 | return [self mas_##attr]; \ 54 | } 55 | 56 | @implementation MAS_VIEW (MASShorthandAdditions) 57 | 58 | MAS_ATTR_FORWARD(top); 59 | MAS_ATTR_FORWARD(left); 60 | MAS_ATTR_FORWARD(bottom); 61 | MAS_ATTR_FORWARD(right); 62 | MAS_ATTR_FORWARD(leading); 63 | MAS_ATTR_FORWARD(trailing); 64 | MAS_ATTR_FORWARD(width); 65 | MAS_ATTR_FORWARD(height); 66 | MAS_ATTR_FORWARD(centerX); 67 | MAS_ATTR_FORWARD(centerY); 68 | MAS_ATTR_FORWARD(baseline); 69 | 70 | #if TARGET_OS_IPHONE 71 | 72 | MAS_ATTR_FORWARD(leftMargin); 73 | MAS_ATTR_FORWARD(rightMargin); 74 | MAS_ATTR_FORWARD(topMargin); 75 | MAS_ATTR_FORWARD(bottomMargin); 76 | MAS_ATTR_FORWARD(leadingMargin); 77 | MAS_ATTR_FORWARD(trailingMargin); 78 | MAS_ATTR_FORWARD(centerXWithinMargins); 79 | MAS_ATTR_FORWARD(centerYWithinMargins); 80 | 81 | #endif 82 | 83 | - (MASViewAttribute *(^)(NSLayoutAttribute))attribute { 84 | return [self mas_attribute]; 85 | } 86 | 87 | - (NSArray *)makeConstraints:(void(^)(MASConstraintMaker *))block { 88 | return [self mas_makeConstraints:block]; 89 | } 90 | 91 | - (NSArray *)updateConstraints:(void(^)(MASConstraintMaker *))block { 92 | return [self mas_updateConstraints:block]; 93 | } 94 | 95 | - (NSArray *)remakeConstraints:(void(^)(MASConstraintMaker *))block { 96 | return [self mas_remakeConstraints:block]; 97 | } 98 | 99 | @end 100 | 101 | #endif 102 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/ViewController+MASAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+MASAdditions.h 3 | // Masonry 4 | // 5 | // Created by Craig Siemens on 2015-06-23. 6 | // 7 | // 8 | 9 | #import "MASUtilities.h" 10 | #import "MASConstraintMaker.h" 11 | #import "MASViewAttribute.h" 12 | 13 | #ifdef MAS_VIEW_CONTROLLER 14 | 15 | @interface MAS_VIEW_CONTROLLER (MASAdditions) 16 | 17 | /** 18 | * following properties return a new MASViewAttribute with appropriate UILa 8youtGuide and NSLayoutAttribute 19 | */ 20 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_topLayoutGuide; 21 | @property (nonatomic, strong, readonly) MASViewAttribute *mas_bottomLayoutGuide; 22 | 23 | @end 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/Masonry/ViewController+MASAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+MASAdditions.m 3 | // Masonry 4 | // 5 | // Created by Craig Siemens on 2015-06-23. 6 | // 7 | // 8 | 9 | #import "ViewController+MASAdditions.h" 10 | 11 | #ifdef MAS_VIEW_CONTROLLER 12 | 13 | @implementation MAS_VIEW_CONTROLLER (MASAdditions) 14 | 15 | - (MASViewAttribute *)mas_topLayoutGuide { 16 | return [[MASViewAttribute alloc] initWithView:self.view item:self.topLayoutGuide layoutAttribute:NSLayoutAttributeBottom]; 17 | } 18 | 19 | - (MASViewAttribute *)mas_bottomLayoutGuide { 20 | return [[MASViewAttribute alloc] initWithView:self.view item:self.bottomLayoutGuide layoutAttribute:NSLayoutAttributeTop]; 21 | } 22 | 23 | @end 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Other/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // QQ音乐 4 | // 5 | // Created by 赵赫 on 15/9/9. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Tool/ZHAudioTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZHAudioTool.h 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | 13 | @interface ZHAudioTool : NSObject 14 | 15 | + (AVAudioPlayer *)playMusicWithMuiscName:(NSString *)musicName; 16 | 17 | + (void)pauseMusicWithMusicName:(NSString *)musicName; 18 | 19 | + (void)stopMusicWithMusicName:(NSString *)musicName; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Tool/ZHAudioTool.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZHAudioTool.m 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import "ZHAudioTool.h" 10 | 11 | @implementation ZHAudioTool 12 | 13 | static NSMutableDictionary *_player; 14 | 15 | +(void)initialize 16 | { 17 | _player = [NSMutableDictionary dictionary]; 18 | 19 | } 20 | 21 | + (AVAudioPlayer *)playMusicWithMuiscName:(NSString *)musicName 22 | { 23 | 24 | // 1.从字典中取出对应的数据 25 | AVAudioPlayer *player = _player[musicName]; 26 | 27 | // 2.如果取出为nil,创建对应播放器,并存入字典 28 | if (player == nil) { 29 | 30 | NSURL *url = [[NSBundle mainBundle] URLForResource:musicName withExtension:nil]; 31 | player = [[AVAudioPlayer alloc] initWithContentsOfURL:url error:nil]; 32 | // 将播放器存入字典中 33 | [_player setObject:player forKey:musicName]; 34 | } 35 | 36 | // 播放歌曲 37 | [player play]; 38 | return player; 39 | 40 | } 41 | 42 | + (void)pauseMusicWithMusicName:(NSString *)musicName 43 | { 44 | // 1.取出播放器 45 | AVAudioPlayer *player = _player[musicName]; 46 | 47 | // 2.如果不为nil,则暂停 48 | if (player) { 49 | [player pause]; 50 | } 51 | 52 | } 53 | 54 | + (void)stopMusicWithMusicName:(NSString *)musicName 55 | { 56 | 57 | // 1.取出播放器 58 | AVAudioPlayer *player = _player[musicName]; 59 | 60 | // 2.如果不为nil,则停止 61 | if (player) { 62 | [player stop]; 63 | [_player removeObjectForKey:musicName]; 64 | player = nil; 65 | } 66 | 67 | 68 | } 69 | 70 | @end 71 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Tool/ZHLrcTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZHLrcTool.h 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ZHLrcTool : NSObject 12 | 13 | + (NSArray *)lrcToolWithLrcname:(NSString *)lrcname; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Tool/ZHLrcTool.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZHLrcTool.m 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import "ZHLrcTool.h" 10 | #import "ZHLrcline.h" 11 | 12 | @implementation ZHLrcTool 13 | + (NSArray *)lrcToolWithLrcname:(NSString *)lrcname 14 | { 15 | // 1.获取歌词的路径 16 | NSString *lrcFilePath = [[NSBundle mainBundle] pathForResource:lrcname ofType:nil]; 17 | 18 | // 2.加载对应的歌词 19 | NSString *lrcString = [NSString stringWithContentsOfFile:lrcFilePath encoding:NSUTF8StringEncoding error:nil]; 20 | NSArray *lrcArray = [lrcString componentsSeparatedByString:@"\n"]; 21 | 22 | // 3.遍历每一句歌词 23 | NSMutableArray *tempArray = [NSMutableArray array]; 24 | for (NSString *lrclineString in lrcArray) { 25 | // 3.1.过滤掉一些不需要的行号 26 | if ([lrclineString hasPrefix:@"[ti:"] || [lrclineString hasPrefix:@"[ar:"] || [lrclineString hasPrefix:@"[al:"] || ![lrclineString hasPrefix:@"["]) { 27 | continue; 28 | } 29 | 30 | // 3.2.将每一句歌词转成模型对象 31 | ZHLrcline *lrcline = [ZHLrcline lrclineWithLrcString:lrclineString]; 32 | 33 | [tempArray addObject:lrcline]; 34 | } 35 | 36 | return tempArray; 37 | } 38 | @end 39 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Tool/ZHMusicTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZHMusicTool 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import 10 | @class ZHMusic; 11 | 12 | @interface ZHMusicTool : NSObject 13 | 14 | + (NSArray *)musics; 15 | 16 | + (void)setPlayingMusic:(ZHMusic *)playingMusic; 17 | 18 | + (ZHMusic *)playingMusic; 19 | 20 | + (ZHMusic *)nextMusic; 21 | 22 | + (ZHMusic *)previousMusic; 23 | 24 | 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/Tool/ZHMusicTool.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZHMusicTool.m 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import "ZHMusicTool.h" 10 | #import "ZHMusic.h" 11 | #import "MJExtension.h" 12 | 13 | 14 | @implementation ZHMusicTool 15 | 16 | static NSArray *_music; 17 | static ZHMusic *_playingMusic; 18 | 19 | +(void)initialize 20 | { 21 | 22 | _music = [ZHMusic objectArrayWithFilename:@"Musics.plist"]; 23 | _playingMusic = _music[7]; 24 | 25 | } 26 | 27 | + (NSArray *)musics 28 | { 29 | 30 | return _music; 31 | 32 | } 33 | 34 | + (void)setPlayingMusic:(ZHMusic *)playingMusic 35 | { 36 | 37 | _playingMusic = playingMusic; 38 | 39 | } 40 | 41 | + (ZHMusic *)playingMusic 42 | { 43 | return _playingMusic; 44 | 45 | } 46 | 47 | + (ZHMusic *)nextMusic 48 | { 49 | 50 | // 1.先获取当前歌曲的下标值 51 | NSInteger currentIndex = [_music indexOfObject:_playingMusic]; 52 | 53 | // 2.获取下一首歌的下标值 54 | NSInteger nextIndex = currentIndex + 1; 55 | if (nextIndex > _music.count - 1) { 56 | nextIndex = 0; 57 | } 58 | 59 | // 3.获取下一首歌曲 60 | ZHMusic *nextMusic = _music[nextIndex]; 61 | 62 | return nextMusic; 63 | 64 | } 65 | 66 | + (ZHMusic *)previousMusic 67 | { 68 | 69 | // 1.先获取当前歌曲的下标值 70 | NSInteger currentIndex = [_music indexOfObject:_playingMusic]; 71 | 72 | // 2.获取下一首歌的下标值 73 | NSInteger previousIndex = currentIndex - 1; 74 | if (previousIndex < 0) { 75 | previousIndex = _music.count - 1; 76 | } 77 | 78 | // 3.获取下一首歌曲 79 | ZHMusic *previousMusic = _music[previousIndex]; 80 | 81 | return previousMusic ; 82 | 83 | } 84 | 85 | @end 86 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/View/ZHLrcCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZHLrcCell.h 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import 10 | @class ZHLrcLabel; 11 | 12 | @interface ZHLrcCell : UITableViewCell 13 | 14 | /** 歌词的label */ 15 | @property (nonatomic, weak, readonly) ZHLrcLabel *lrcLabel; 16 | 17 | 18 | + (instancetype)lrcCellWithTableView:(UITableView *)tableView; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/View/ZHLrcCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZHLrcCell.m 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import "ZHLrcCell.h" 10 | #import "ZHLrcLabel.h" 11 | #import "Masonry.h" 12 | 13 | @implementation ZHLrcCell 14 | 15 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 16 | { 17 | if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { 18 | ZHLrcLabel *lrcLabel = [[ZHLrcLabel alloc] init]; 19 | lrcLabel.textColor = [UIColor whiteColor]; 20 | lrcLabel.font = [UIFont systemFontOfSize:14.0]; 21 | lrcLabel.textAlignment = NSTextAlignmentCenter; 22 | [self.contentView addSubview:lrcLabel]; 23 | _lrcLabel = lrcLabel; 24 | lrcLabel.translatesAutoresizingMaskIntoConstraints = NO; 25 | [lrcLabel mas_makeConstraints:^(MASConstraintMaker *make) { 26 | make.center.equalTo(self.contentView); 27 | }]; 28 | } 29 | return self; 30 | } 31 | 32 | + (instancetype)lrcCellWithTableView:(UITableView *)tableView 33 | { 34 | static NSString *ID = @"LrcCell"; 35 | ZHLrcCell *cell = [tableView dequeueReusableCellWithIdentifier:ID]; 36 | if (cell == nil) { 37 | cell = [[ZHLrcCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID]; 38 | cell.backgroundColor = [UIColor clearColor]; 39 | cell.selectionStyle = UITableViewCellSelectionStyleNone; 40 | } 41 | 42 | return cell; 43 | } 44 | 45 | @end 46 | 47 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/View/ZHLrcLabel.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZHLrcLabel.h 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ZHLrcLabel : UILabel 12 | /** 当前句的进度 */ 13 | @property (nonatomic, assign) CGFloat progress; 14 | @end 15 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/View/ZHLrcLabel.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZHLrcLabel.m 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import "ZHLrcLabel.h" 10 | 11 | @implementation ZHLrcLabel 12 | 13 | - (void)setProgress:(CGFloat)progress 14 | { 15 | _progress = progress; 16 | 17 | [self setNeedsDisplay]; 18 | } 19 | 20 | - (void)drawRect:(CGRect)rect 21 | { 22 | [super drawRect:rect]; 23 | 24 | CGRect drawRect = CGRectMake(0, 0, self.bounds.size.width * self.progress, self.bounds.size.height); 25 | [[UIColor greenColor] set]; 26 | UIRectFillUsingBlendMode(drawRect, kCGBlendModeSourceIn); 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/View/ZHLrcView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ZHLrcView.h 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import 10 | @class ZHLrcLabel; 11 | 12 | @interface ZHLrcView : UIScrollView 13 | /** 歌词的名称 */ 14 | @property (nonatomic, copy) NSString *lrcname; 15 | 16 | /** 当前歌曲播放的时间 */ 17 | @property (nonatomic, assign) NSTimeInterval currentTime; 18 | 19 | /** 外面的Label */ 20 | @property (nonatomic, weak) ZHLrcLabel *lrcLabel; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Classess/View/ZHLrcView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ZHLrcView.m 3 | // QQMusic 4 | // 5 | // Created by 赵赫 on 15/9/11. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import "ZHLrcView.h" 10 | #import "Masonry.h" 11 | #import "ZHLrcTool.h" 12 | #import "ZHLrcline.h" 13 | #import "ZHLrcCell.h" 14 | #import "ZHLrcLabel.h" 15 | 16 | @interface ZHLrcView() 17 | 18 | /** 显示歌词View */ 19 | @property (nonatomic, weak) UITableView *tableView; 20 | 21 | /** 歌词的数据 */ 22 | @property (nonatomic, strong) NSArray *lrclist; 23 | 24 | /** 当前正在播放的歌词的下标 */ 25 | @property (nonatomic, assign) NSInteger currentIndex; 26 | 27 | @end 28 | 29 | @implementation ZHLrcView 30 | 31 | - (id)initWithCoder:(NSCoder *)aDecoder 32 | { 33 | if (self = [super initWithCoder:aDecoder]) { 34 | [self setupTableView]; 35 | } 36 | return self; 37 | } 38 | 39 | 40 | - (void)setupTableView 41 | { 42 | UITableView *tableView = [[UITableView alloc] init]; 43 | tableView.dataSource = self; 44 | tableView.translatesAutoresizingMaskIntoConstraints = NO; 45 | tableView.backgroundColor = [UIColor clearColor]; 46 | tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 47 | tableView.rowHeight = 35; 48 | [self addSubview:tableView]; 49 | self.tableView = tableView; 50 | 51 | } 52 | 53 | - (void)layoutSubviews 54 | { 55 | [super layoutSubviews]; 56 | 57 | [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { 58 | make.top.equalTo(self.mas_top); 59 | make.height.equalTo(self.mas_height); 60 | make.bottom.equalTo(self.mas_bottom); 61 | make.left.equalTo(self.mas_left).offset(self.bounds.size.width); 62 | make.width.equalTo(self.mas_width); 63 | make.right.equalTo(self.mas_right); 64 | }]; 65 | 66 | // 设置多余的滑动区域 67 | self.tableView.contentInset = UIEdgeInsetsMake(self.bounds.size.height * 0.5, 0, self.bounds.size.height * 0.5, 0); 68 | } 69 | 70 | #pragma mark - 重写setLrcname的方法 71 | - (void)setLrcname:(NSString *)lrcname 72 | { 73 | _lrcname = [lrcname copy]; 74 | 75 | // 解析歌词 76 | self.lrclist = [ZHLrcTool lrcToolWithLrcname:lrcname]; 77 | 78 | // 刷新表格 79 | [self.tableView reloadData]; 80 | } 81 | 82 | #pragma mark - 实现tableView的数据源方法 83 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 84 | { 85 | return self.lrclist.count; 86 | } 87 | 88 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 89 | { 90 | // 0.创建Cell 91 | ZHLrcCell *cell = [ZHLrcCell lrcCellWithTableView:tableView]; 92 | 93 | if (indexPath.row == self.currentIndex) { 94 | cell.lrcLabel.font = [UIFont systemFontOfSize:18]; 95 | } else { 96 | cell.lrcLabel.font = [UIFont systemFontOfSize:14.0]; 97 | cell.lrcLabel.progress = 0; 98 | } 99 | 100 | // 1.取出歌词 101 | ZHLrcline *lrcline = self.lrclist[indexPath.row]; 102 | 103 | // 2.给cell设置数据 104 | cell.lrcLabel.text = lrcline.text; 105 | 106 | return cell; 107 | } 108 | 109 | #pragma mark - 重写setCurrentTime方法 110 | - (void)setCurrentTime:(NSTimeInterval)currentTime 111 | { 112 | _currentTime = currentTime; 113 | 114 | // 1.和数组中歌词的时间对比,找出应该显示的歌词 115 | NSInteger count = self.lrclist.count; 116 | for (int i = 0; i < count; i++) { 117 | // 2.取出当前句的歌词 118 | ZHLrcline *lrcline = self.lrclist[i]; 119 | 120 | // 3.取出下一句歌词 121 | NSInteger nextIndex = i + 1; 122 | if (nextIndex > count - 1) return; 123 | ZHLrcline *nextLrcline = self.lrclist[nextIndex]; 124 | 125 | // 4.让当前播放时间和当前句歌词的时间和下一句歌词的时间对比,如果当前时间大于等于当前句歌词的时间,并且小于下一句歌词的时间,显示该句歌词 126 | // 03:25.84 127 | /* 128 | [00:48.15]你是我的小呀小苹果儿 129 | [00:51.92]怎么爱你都不嫌多 130 | 131 | [00:48.15]-->[00:51.92] 132 | [00:51.92] - [00:48.15] / [00:51.92] - [00:48.15] 133 | */ 134 | if (currentTime >= lrcline.time && currentTime < nextLrcline.time && self.currentIndex != i) { 135 | // 4.1.获取前一句播放歌词的NSIndexPath 136 | NSMutableArray *indexs = [NSMutableArray array]; 137 | if (self.currentIndex < count - 1) { 138 | NSIndexPath *previousIndexPath = [NSIndexPath indexPathForRow:self.currentIndex inSection:0]; 139 | [indexs addObject:previousIndexPath]; 140 | } 141 | 142 | // 4.2.记录当前播放句的下标值 143 | self.currentIndex = i; 144 | 145 | // 4.3.获取当前句的NSIndexPath 146 | NSIndexPath *indexPath = [NSIndexPath indexPathForRow:i inSection:0]; 147 | [indexs addObject:indexPath]; 148 | 149 | // 4.4.刷新歌词 150 | [self.tableView reloadRowsAtIndexPaths:indexs withRowAnimation:UITableViewRowAnimationNone]; 151 | 152 | // 4.5.让tableView的当前播放的句,滚动中间位置 153 | [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionBottom animated:YES]; 154 | 155 | // 4.6.改变外面歌词Label显示的文字 156 | self.lrcLabel.text = lrcline.text; 157 | } 158 | 159 | // 如果正在更新某一句歌词 160 | if (self.currentIndex == i) { 161 | // 1.取出i位置的cell 162 | NSIndexPath *indexPath = [NSIndexPath indexPathForRow:i inSection:0]; 163 | ZHLrcCell *cell = (ZHLrcCell *)[self.tableView cellForRowAtIndexPath:indexPath]; 164 | 165 | // 2.更新cell中的lrcLabel的进度 166 | cell.lrcLabel.progress = (currentTime - lrcline.time) / (nextLrcline.time - lrcline.time); 167 | 168 | // 3.改变外面歌词Label显示的进度 169 | self.lrcLabel.progress = (currentTime - lrcline.time) / (nextLrcline.time - lrcline.time); 170 | } 171 | } 172 | } 173 | 174 | @end 175 | 176 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/AppIcon29x29@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/AppIcon29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/AppIcon29x29@3x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/AppIcon40x40@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/AppIcon40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/AppIcon40x40@3x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/AppIcon57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/AppIcon57x57.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/AppIcon57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/AppIcon57x57@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/AppIcon60x60@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/AppIcon60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/AppIcon60x60@3x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "3x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "2x" 22 | }, 23 | { 24 | "size" : "40x40", 25 | "idiom" : "iphone", 26 | "filename" : "AppIcon40x40@3x.png", 27 | "scale" : "3x" 28 | }, 29 | { 30 | "size" : "57x57", 31 | "idiom" : "iphone", 32 | "filename" : "AppIcon57x57.png", 33 | "scale" : "1x" 34 | }, 35 | { 36 | "size" : "57x57", 37 | "idiom" : "iphone", 38 | "filename" : "AppIcon57x57@2x.png", 39 | "scale" : "2x" 40 | }, 41 | { 42 | "size" : "60x60", 43 | "idiom" : "iphone", 44 | "filename" : "AppIcon60x60@2x.png", 45 | "scale" : "2x" 46 | }, 47 | { 48 | "size" : "60x60", 49 | "idiom" : "iphone", 50 | "filename" : "AppIcon60x60@3x.png", 51 | "scale" : "3x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "size" : "40x40", 70 | "idiom" : "ipad", 71 | "filename" : "AppIcon40x40@2x.png", 72 | "scale" : "2x" 73 | }, 74 | { 75 | "idiom" : "ipad", 76 | "size" : "76x76", 77 | "scale" : "1x" 78 | }, 79 | { 80 | "idiom" : "ipad", 81 | "size" : "76x76", 82 | "scale" : "2x" 83 | }, 84 | { 85 | "size" : "24x24", 86 | "idiom" : "watch", 87 | "scale" : "2x", 88 | "role" : "notificationCenter", 89 | "subtype" : "38mm" 90 | }, 91 | { 92 | "size" : "27.5x27.5", 93 | "idiom" : "watch", 94 | "scale" : "2x", 95 | "role" : "notificationCenter", 96 | "subtype" : "42mm" 97 | }, 98 | { 99 | "size" : "29x29", 100 | "idiom" : "watch", 101 | "filename" : "AppIcon29x29@2x.png", 102 | "role" : "companionSettings", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "29x29", 107 | "idiom" : "watch", 108 | "filename" : "AppIcon29x29@3x.png", 109 | "role" : "companionSettings", 110 | "scale" : "3x" 111 | }, 112 | { 113 | "size" : "40x40", 114 | "idiom" : "watch", 115 | "scale" : "2x", 116 | "role" : "appLauncher", 117 | "subtype" : "38mm" 118 | }, 119 | { 120 | "size" : "44x44", 121 | "idiom" : "watch", 122 | "scale" : "2x", 123 | "role" : "longLook", 124 | "subtype" : "42mm" 125 | }, 126 | { 127 | "size" : "86x86", 128 | "idiom" : "watch", 129 | "scale" : "2x", 130 | "role" : "quickLook", 131 | "subtype" : "38mm" 132 | }, 133 | { 134 | "size" : "98x98", 135 | "idiom" : "watch", 136 | "scale" : "2x", 137 | "role" : "quickLook", 138 | "subtype" : "42mm" 139 | } 140 | ], 141 | "info" : { 142 | "version" : 1, 143 | "author" : "xcode" 144 | } 145 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/bb.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "bb@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/bb.imageset/bb@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/bb.imageset/bb@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/bb_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "bb_icon@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/bb_icon.imageset/bb_icon@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/bb_icon.imageset/bb_icon@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/dzq.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "dzq@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/dzq.imageset/dzq@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/dzq.imageset/dzq@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/dzq_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "dzq_icon@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/dzq_icon.imageset/dzq_icon@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/dzq_icon.imageset/dzq_icon@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/eason.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "eason@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/eason.imageset/eason@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/eason.imageset/eason@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/eason_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "eason_icon@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/eason_icon.imageset/eason_icon@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/eason_icon.imageset/eason_icon@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/jay.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "jay@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/jay.imageset/jay@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/jay.imageset/jay@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/jay_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "jay_icon@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/jay_icon.imageset/jay_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/jay_icon.imageset/jay_icon@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/jj.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "jj@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/jj.imageset/jj@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/jj.imageset/jj@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/jj_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "jj_icon@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/jj_icon.imageset/jj_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/jj_icon.imageset/jj_icon@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/kzxd.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "kzxd@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/kzxd.imageset/kzxd@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/kzxd.imageset/kzxd@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/kzxd_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "kzxd_icon@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/kzxd_icon.imageset/kzxd_icon@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/kzxd_icon.imageset/kzxd_icon@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/lkq.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "lkq@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/lkq.imageset/lkq@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/lkq.imageset/lkq@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/lkq_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "lkq_icon@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/lkq_icon.imageset/lkq_icon@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/lkq_icon.imageset/lkq_icon@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/nanquan.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "nanquan@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/nanquan.imageset/nanquan@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/nanquan.imageset/nanquan@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/nanquan_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "nanquan_icon@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/nanquan_icon.imageset/nanquan_icon@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/nanquan_icon.imageset/nanquan_icon@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/wf.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "wf@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/wf.imageset/wf@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/wf.imageset/wf@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/wf_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "wf_icon@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/wf_icon.imageset/wf_icon@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/wf_icon.imageset/wf_icon@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/zxy.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "zxy@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/zxy.imageset/zxy@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/zxy.imageset/zxy@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/zxy_icon.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "zxy_icon@2x.jpg" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/Images/zxy_icon.imageset/zxy_icon@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/Images/zxy_icon.imageset/zxy_icon@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "736h", 7 | "filename" : "Default-iphone6plus@3x.png", 8 | "minimum-system-version" : "8.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "667h", 16 | "filename" : "Default-iphone6@2x.png", 17 | "minimum-system-version" : "8.0", 18 | "orientation" : "portrait", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "orientation" : "portrait", 23 | "idiom" : "iphone", 24 | "extent" : "full-screen", 25 | "minimum-system-version" : "7.0", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "extent" : "full-screen", 30 | "idiom" : "iphone", 31 | "subtype" : "retina4", 32 | "filename" : "Default-568h@2x.png", 33 | "minimum-system-version" : "7.0", 34 | "orientation" : "portrait", 35 | "scale" : "2x" 36 | }, 37 | { 38 | "orientation" : "portrait", 39 | "idiom" : "ipad", 40 | "extent" : "full-screen", 41 | "minimum-system-version" : "7.0", 42 | "scale" : "1x" 43 | }, 44 | { 45 | "orientation" : "landscape", 46 | "idiom" : "ipad", 47 | "extent" : "full-screen", 48 | "minimum-system-version" : "7.0", 49 | "scale" : "1x" 50 | }, 51 | { 52 | "orientation" : "portrait", 53 | "idiom" : "ipad", 54 | "extent" : "full-screen", 55 | "minimum-system-version" : "7.0", 56 | "scale" : "2x" 57 | }, 58 | { 59 | "orientation" : "landscape", 60 | "idiom" : "ipad", 61 | "extent" : "full-screen", 62 | "minimum-system-version" : "7.0", 63 | "scale" : "2x" 64 | }, 65 | { 66 | "orientation" : "portrait", 67 | "idiom" : "iphone", 68 | "extent" : "full-screen", 69 | "filename" : "Default.png", 70 | "scale" : "1x" 71 | }, 72 | { 73 | "orientation" : "portrait", 74 | "idiom" : "iphone", 75 | "extent" : "full-screen", 76 | "filename" : "Default@2x.png", 77 | "scale" : "2x" 78 | } 79 | ], 80 | "info" : { 81 | "version" : 1, 82 | "author" : "xcode" 83 | } 84 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/LaunchImage.launchimage/Default-iphone6@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/LaunchImage.launchimage/Default-iphone6@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/LaunchImage.launchimage/Default-iphone6plus@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/LaunchImage.launchimage/Default-iphone6plus@3x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/main_tab_more.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "main_tab_more@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/main_tab_more.imageset/main_tab_more@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/播放界面/main_tab_more.imageset/main_tab_more@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/main_tab_more_h.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "main_tab_more_h@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/main_tab_more_h.imageset/main_tab_more_h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/播放界面/main_tab_more_h.imageset/main_tab_more_h@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/miniplayer_btn_playlist_close.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "miniplayer_btn_playlist_close@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/miniplayer_btn_playlist_close.imageset/miniplayer_btn_playlist_close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/播放界面/miniplayer_btn_playlist_close.imageset/miniplayer_btn_playlist_close@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/miniplayer_btn_playlist_close_b.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "miniplayer_btn_playlist_close_b@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/miniplayer_btn_playlist_close_b.imageset/miniplayer_btn_playlist_close_b@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/播放界面/miniplayer_btn_playlist_close_b.imageset/miniplayer_btn_playlist_close_b@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_next_highlight.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "player_btn_next_highlight@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_next_highlight.imageset/player_btn_next_highlight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_next_highlight.imageset/player_btn_next_highlight@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_next_normal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "player_btn_next_normal@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_next_normal.imageset/player_btn_next_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_next_normal.imageset/player_btn_next_normal@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_pause_highlight.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "player_btn_pause_highlight@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_pause_highlight.imageset/player_btn_pause_highlight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_pause_highlight.imageset/player_btn_pause_highlight@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_pause_normal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "player_btn_pause_normal@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_pause_normal.imageset/player_btn_pause_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_pause_normal.imageset/player_btn_pause_normal@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_play_highlight.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "player_btn_play_highlight@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_play_highlight.imageset/player_btn_play_highlight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_play_highlight.imageset/player_btn_play_highlight@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_play_normal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "player_btn_play_normal@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_play_normal.imageset/player_btn_play_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_play_normal.imageset/player_btn_play_normal@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_pre_highlight.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "player_btn_pre_highlight@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_pre_highlight.imageset/player_btn_pre_highlight@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_pre_highlight.imageset/player_btn_pre_highlight@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_pre_normal.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "player_btn_pre_normal@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_pre_normal.imageset/player_btn_pre_normal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/播放界面/player_btn_pre_normal.imageset/player_btn_pre_normal@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_slider_playback_thumb.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "player_slider_playback_thumb@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/player_slider_playback_thumb.imageset/player_slider_playback_thumb@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/播放界面/player_slider_playback_thumb.imageset/player_slider_playback_thumb@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/playing_translate_lyric_select_h.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "playing_translate_lyric_select_h@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/playing_translate_lyric_select_h.imageset/playing_translate_lyric_select_h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/播放界面/playing_translate_lyric_select_h.imageset/playing_translate_lyric_select_h@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/playing_translate_lyric_select_n.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "playing_translate_lyric_select_n@2x.png" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /QQMusic/QQMusic/Images.xcassets/播放界面/playing_translate_lyric_select_n.imageset/playing_translate_lyric_select_n@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Images.xcassets/播放界面/playing_translate_lyric_select_n.imageset/playing_translate_lyric_select_n@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.zhao.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/bb@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/bb@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/bb_icon@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/bb_icon@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/dzq@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/dzq@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/dzq_icon@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/dzq_icon@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/eason@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/eason@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/eason_icon@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/eason_icon@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/jay@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/jay@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/jay_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/jay_icon@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/jj@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/jj@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/jj_icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/jj_icon@2x.png -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/kzxd@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/kzxd@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/kzxd_icon@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/kzxd_icon@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/lkq@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/lkq@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/lkq_icon@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/lkq_icon@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/nanquan@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/nanquan@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/nanquan_icon@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/nanquan_icon@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/wf@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/wf@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/wf_icon@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/wf_icon@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/zxy@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/zxy@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Images/zxy_icon@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/Images/zxy_icon@2x.jpg -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Lrcs/10405520.lrc: -------------------------------------------------------------------------------- 1 | [ti:] 2 | [ar:] 3 | [al:] 4 | 5 | [00:00.89]传奇 6 | [00:02.34]作词:刘兵 7 | [00:03.82]作曲:李健 8 | [00:05.48]演唱:王菲 9 | [00:07.39] 10 | [00:33.20]只是因为在人群中多看了你一眼 11 | [00:40.46]再也没能忘掉你容颜 12 | [00:47.68]梦想着偶然能有一天再相见 13 | [00:55.29]从此我开始孤单思念 14 | [01:00.90] 15 | [01:02.38]想你时你在天边 16 | [01:09.86]想你时你在眼前 17 | [01:17.44]想你时你在脑海 18 | [01:24.98]想你时你在心田 19 | [01:31.78] 20 | [01:32.64]宁愿相信我们前世有约 21 | [01:38.90]今生的爱情故事 不会再改变 22 | [01:47.46]宁愿用这一生等你发现 23 | [01:54.23]我一直在你身旁 从未走远 24 | [02:04.05] 25 | [02:36.84]只是因为在人群中多看了你一眼 26 | [02:44.47]再也没能忘掉你容颜 27 | [02:51.85]梦想着偶然能有一天再相见 28 | [02:59.43]从此我开始孤单思念 29 | [03:05.01] 30 | [03:06.35]想你时你在天边 31 | [03:14.09]想你时你在眼前 32 | [03:21.46]想你时你在脑海 33 | [03:28.92]想你时你在心田 34 | [03:35.38] 35 | [03:36.89]宁愿相信我们前世有约 36 | [03:43.31]今生的爱情故事 不会再改变 37 | [03:51.91]宁愿用这一生等你发现 38 | [03:58.15]我一直在你身旁 从未走远 39 | [04:05.78] 40 | [04:06.86]宁愿相信我们前世有约 41 | [04:13.15]今生的爱情故事 不会再改变 42 | [04:21.78]宁愿用这一生等你发现 43 | [04:28.22]我一直在你身旁 从未走远 44 | [04:36.47] 45 | [04:38.15]只是因为在人群中多看了你一眼 46 | [04:46.38] -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Lrcs/10736444.lrc: -------------------------------------------------------------------------------- 1 | [ti:简单爱] 2 | [ar:周杰伦] 3 | [al:范特西] 4 | 5 | [00:00.91]简单爱 6 | [00:06.97]作词:徐若瑄 作曲:周杰伦 7 | [00:08.33]演唱:周杰伦 8 | [00:11.03] 9 | [00:25.64]说不上为什麽 我变得很主动 10 | [00:31.03]若爱上一个人 什麽都会值得去做 11 | [00:35.90]我想大声宣布 对你依依不舍 12 | [00:40.81]连隔壁邻居都猜到我现在的感受 13 | [00:45.03] 14 | [00:45.76]河边的风 在吹着头发飘动 15 | [00:50.74]牵着你的手 一阵莫名感动 16 | [00:55.66]我想带你 回我的外婆家 17 | [00:59.45]一起看着日落 一直到我们都睡着 18 | [01:04.68] 19 | [01:05.43]我想就这样牵着你的手不放开 20 | [01:10.43]爱能不能够永远单纯没有悲哀 21 | [01:15.24]我想带你骑单车 我想和你看棒球 22 | [01:20.74]想这样没担忧 唱着歌 一直走 23 | [01:24.74] 24 | [01:25.50]我想就这样牵着你的手不放开 25 | [01:30.28]爱可不可以简简单单没有伤害 26 | [01:35.09]你靠着我的肩膀 你在我胸口睡着 27 | [01:40.52]像这样的生活 我爱你 你爱我 28 | [01:44.42] 29 | [01:45.07]想 简 简 单 单 爱 30 | [01:54.56]想 简 简 单 单 爱 31 | [02:01.94] 32 | [02:04.97]我想大声宣布 对你依依不舍 33 | [02:09.93]连隔壁邻居都猜到我现在的感受 34 | [02:14.24] 35 | [02:15.01]河边的风 在吹着头发飘动 36 | [02:19.79]牵着你的手 一阵莫名感动 37 | [02:24.78]我想带你 回我的外婆家 38 | [02:28.47]一起看着日落 一直到我们都睡着 39 | [02:33.80] 40 | [02:34.66]我想就这样牵着你的手不放开 41 | [02:39.49]爱能不能够永远单纯没有悲哀 42 | [02:44.34]我想带你骑单车 我想和你看棒球 43 | [02:49.72]想这样没担忧 唱着歌 一直走 44 | [02:53.88] 45 | [02:54.48]我想就这样牵着你的手不放开 46 | [02:59.38]爱可不可以简简单单没有伤害 47 | [03:03.96]你靠着我的肩膀 你在我胸口睡着 48 | [03:09.60]像这样的生活 我爱你 你爱我 49 | [03:13.57] 50 | [03:14.23]想 简 简 单 单 爱 51 | [03:23.98]想 简 简 单 单 爱 52 | [03:30.93] 53 | [03:33.86]我想就这样牵着你的手不放开 54 | [03:39.02]爱能不能够永远单纯没有悲哀 55 | [03:43.75]我想带你骑单车 我想和你看棒球 56 | [03:49.21]想这样没担忧 唱着歌 一直走 57 | [03:53.12] 58 | [03:53.89]我想就这样牵着你的手不放开 59 | [03:58.73]爱可不可以简简单单没有伤害 60 | [04:03.40]你靠着我的肩膀 你在我胸口睡着 61 | [04:08.96]像这样的生活 我爱你 你爱我 62 | [04:12.86] -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Lrcs/120125029.lrc: -------------------------------------------------------------------------------- 1 | 2 | [00:00.91]小苹果 3 | [00:01.75]作词:王太利 作曲:王太利 4 | [00:02.47]演唱:筷子兄弟 5 | [00:03.32] 6 | [00:17.40]我种下一颗种子 7 | [00:19.12]终于长出了果实 8 | [00:21.04]今天是个伟大日子 9 | [00:25.10]摘下星星送给你 10 | [00:26.79]拽下月亮送给你 11 | [00:28.77]让太阳每天为你升起 12 | [00:31.25] 13 | [00:32.67]变成蜡烛燃烧自己 14 | [00:34.47]只为照亮你 15 | [00:36.44]把我一切都献给你 16 | [00:38.22]只要你欢喜 17 | [00:40.19]你让我每个明天都 18 | [00:42.15]变得有意义 19 | [00:44.04]生命虽短爱你永远 20 | [00:46.08]不离不弃 21 | [00:47.81] 22 | [00:48.15]你是我的小呀小苹果儿 23 | [00:51.92]怎么爱你都不嫌多 24 | [00:55.26]红红的小脸儿温暖我的心窝 25 | [00:59.33]点亮我生命的火 火火火火 26 | [01:03.45]你是我的小呀小苹果儿 27 | [01:07.06]就像天边最美的云朵 28 | [01:10.61]春天又来到了花开满山坡 29 | [01:14.70]种下希望就会收获 30 | [01:18.70] 31 | [01:34.12]从不觉得你讨厌 32 | [01:35.92]你的一切都喜欢 33 | [01:37.89]有你的每天都新鲜 34 | [01:41.84]有你阳光更灿烂 35 | [01:43.58]有你黑夜不黑暗 36 | [01:45.50]你是白云我是蓝天 37 | [01:48.09] 38 | [01:49.42]春天和你漫步在盛开的 花丛间 39 | [01:53.23]夏天夜晚陪你一起看 星星眨眼 40 | [01:57.04]秋天黄昏与你徜徉在 金色麦田 41 | [02:00.92]冬天雪花飞舞有你 更加温暖 42 | [02:04.66] 43 | [02:04.96]你是我的小呀小苹果儿 44 | [02:08.49]怎么爱你都不嫌多 45 | [02:12.02]红红的小脸儿温暖我的心窝 46 | [02:16.15]点亮我生命的火 火火火火 47 | [02:20.22]你是我的小呀小苹果儿 48 | [02:23.88]就像天边最美的云朵 49 | [02:27.19]春天又来到了花开满山坡 50 | [02:31.45]种下希望就会收获 51 | [02:35.14] 52 | [02:50.98]你是我的小呀小苹果儿 53 | [02:54.56]怎么爱你都不嫌多 54 | [02:57.93]红红的小脸儿温暖我的心窝 55 | [03:02.18]点亮我生命的火 火火火火 56 | [03:06.15]你是我的小呀小苹果儿 57 | [03:09.93]就像天边最美的云朵 58 | [03:13.27]春天又来到了花开满山坡 59 | [03:17.52]种下希望就会收获 60 | [03:21.43] -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Lrcs/12309111.lrc: -------------------------------------------------------------------------------- 1 | [ti:I want it that way] 2 | [ar:Backstreet Boys] 3 | [al:Millennium] 4 | 5 | [00:00.74]I want it that way 6 | [00:01.74]Backstreet Boys 7 | [00:02.74] 8 | [00:03.74]Yeah-eh-heah 9 | [00:05.61] 10 | [00:09.64]You are, my fire, 11 | [00:14.61]The one, desire 12 | [00:19.50]Believe, when I say, 13 | [00:24.82]I want it that way 14 | [00:29.11]But we, are two worlds apart, 15 | [00:36.37]Can't reach to your heart, 16 | [00:41.16]When you say, 17 | [00:43.98]That I want it that way 18 | [00:48.41]Tell me why, Ain't nothin' 19 | [00:50.75]but a heartache, 20 | [00:53.36]Tell me why, Ain't nothin' 21 | [00:55.81]but a mistake, 22 | [00:58.06]Tell me why, 23 | [00:59.36]I never wanna hear you say, 24 | [01:03.53]I want it that way 25 | [01:07.82]Am I, your fire? 26 | [01:12.67]Your one, desire, desire, 27 | [01:19.83]it's too late, 28 | [01:22.65]But I want it that way 29 | [01:27.19]Tell me why, Ain't nothin' 30 | [01:29.92]but a heartache, 31 | [01:31.37]Tell me why, Ain't nothin' 32 | [01:34.61]but a mistake, 33 | [01:36.87]Tell me why, 34 | [01:38.14]I never wanna hear you say, 35 | [01:42.38]I want it that way 36 | [01:47.09]Now I can see 37 | [01:48.62]that we've fallen apart, 38 | [01:51.86]From the way that it used to be, 39 | [01:55.08]Yeah, 40 | [01:56.49]No matter the distance, 41 | [01:58.96]I want you to know, 42 | [02:01.37]That deep down inside of me... 43 | [02:06.15]You are, my fire, The one, 44 | [02:13.00]desire, 45 | [02:15.47]You are (You are, You are, 46 | [02:19.37]You are...) 47 | [02:20.86] 48 | [02:23.91]Don't wanna hear you say, 49 | [02:26.18]Ain't nothin' but a heartache, 50 | [02:30.81]Ain't nothin' but a mistake,(Don't wanna hear you say), 51 | [02:35.72]I never wanna hear you say, 52 | [02:41.17]I want it that way 53 | [02:44.79]Tell me why, Ain't nothin' 54 | [02:47.03]but a heartache, 55 | [02:48.93]Tell me why, Ain't nothin' 56 | [02:51.92]but a mistake, 57 | [02:54.50]Tell me why, 58 | [02:55.67]I never wanna hear you say,(Don't wanna hear you say), 59 | [02:59.94]I want it that way 60 | [03:04.18]Tell me why... 61 | [03:05.41]Ain't nothin' but a heartache, 62 | [03:10.16]Ain't nothin' but a mistake, 63 | [03:14.04]Tell me why, 64 | [03:15.03]I never wanna hear you say,(Never wanna hear you say it), 65 | [03:19.22]I want it that way 66 | [03:23.83]Cause I want it that way 67 | [03:29.27] -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Lrcs/14945107.lrc: -------------------------------------------------------------------------------- 1 | 2 | [00:00.01]泡沬 3 | [00:00.30]作曲:G.E.M. 作词:G.E.M. 4 | [00:00.50]演唱:邓紫棋 5 | [00:01.10] 6 | [00:01.72]阳光下的泡沫 是彩色的 7 | [00:08.45]就像被骗的我 是幸福的 8 | [00:15.58]追究什么对错 你的谎言 基于你还爱我 9 | [00:27.21] 10 | [00:28.74]美丽的泡沫 虽然一刹花火 11 | [00:35.89]你所有承诺 虽然都太脆弱 12 | [00:42.84]但爱像泡沫 如果能够看破 有什么难过 13 | [00:50.10] 14 | [00:57.95]早该知道泡沫 一触就破 15 | [01:04.98]就像已伤的心 不胜折磨 16 | [01:12.04]也不是谁的错 谎言再多 基于你还爱我 17 | [01:23.39] 18 | [01:25.31]美丽的泡沫 虽然一刹花火 19 | [01:32.36]你所有承诺 虽然都太脆弱 20 | [01:39.45]爱本是泡沫 如果能够看破 有什么难过 21 | [01:53.59]再美的花朵 盛开过就凋落 22 | [02:00.63]再亮眼的星 一闪过就堕落 23 | [02:07.70]爱本是泡沫 如果能够看破 有什么难过 24 | [02:18.64] 25 | [02:22.00]为什么难过 有什么难过 为什么难过 26 | [02:45.99] 27 | [02:46.64]全都是泡沫 只一刹的花火 28 | [02:53.60]你所有承诺 全部都太脆弱 29 | [03:00.68]而你的轮廓 怪我没有看破 才如此难过 30 | [03:14.87]相爱的把握 要如何再搜索 31 | [03:21.82]相拥着寂寞 难道就不寂寞 32 | [03:28.95]爱本是泡沫 怪我没有看破 才如此难过 33 | [03:39.36] 34 | [03:43.92]在雨下的泡沫 一触就破 35 | [03:50.98]当初炽热的心 早已沉没 36 | [03:57.95]说什么你爱我 如果骗我 我宁愿你沉默 37 | [04:09.45] -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Lrcs/235319.lrc: -------------------------------------------------------------------------------- 1 | [ti:心碎了无痕] 2 | [ar:张学友] 3 | [al:] 4 | 5 | [00:01.79]心碎了无痕 6 | [00:02.94]作词:MICHEAL 作曲:吴旭文 7 | [00:04.16]演唱:张学友 8 | [00:05.41] 9 | [00:26.62]闭上你的眼 我的爱人 10 | [00:32.22]吻住你吻住疑问 11 | [00:37.71]你的心已变像落叶飞远 12 | [00:43.65]我宁愿瞎了眼看不见 13 | [00:47.75] 14 | [00:48.95]求求你千千万万不要走 15 | [00:53.79]空的心假的意 16 | [00:56.35]欺骗我都无妨 17 | [01:00.42]我会小小心心的等待 18 | [01:05.00]从施舍从怜悯变成真爱 19 | [01:14.77]相爱难 恨亦难 20 | [01:17.46]我的心碎了无痕 21 | [01:20.76]吻着你心就不会疼 22 | [01:26.01]永不怨 永不变 23 | [01:28.87]永不永远也不问 24 | [01:32.11]伤更深 情更真 25 | [01:37.31] 26 | [02:00.34]闭上你的眼 我的爱人 27 | [02:06.48]吻住你吻住疑问 28 | [02:11.94]你的心已变像落叶飞远 29 | [02:17.87]我宁愿瞎了眼看不见 30 | [02:23.24]求求你千千万万不要走 31 | [02:27.94]空的心假的意 32 | [02:30.76]欺骗我都无妨 33 | [02:34.66]我会小小心心的等待 34 | [02:39.23]从施舍从怜悯变成真爱 35 | [02:48.82]相爱难 恨亦难 36 | [02:51.70]我的心碎了无痕 37 | [02:54.95]吻着你心就不会疼 38 | [03:00.36]永不怨 永不变 39 | [03:03.20]永不永远也不问 40 | [03:06.41]伤更深 情更真 41 | [03:12.84] 42 | [03:34.59]相爱难 恨亦难 43 | [03:37.42]我的心碎了无痕 44 | [03:40.86]吻着你心就不会疼 45 | [03:46.03]永不怨 永不变 46 | [03:48.85]永不永远也不问 47 | [03:52.12]伤更深 情更真 48 | [04:02.01] -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Lrcs/255319.lrc: -------------------------------------------------------------------------------- 1 | [ti:瓦解] 2 | [ar:南拳妈妈] 3 | [al:南拳妈妈的夏天] 4 | 5 | [00:00.01]瓦解 6 | [00:02.74]作词:弹头(宋健彰) 作曲:周杰伦 7 | [00:06.09]演唱:南拳妈妈 8 | [00:09.06] 9 | [00:15.46]说着笑着的午后 10 | [00:19.41]钟声一直在停留 11 | [00:23.25]风声静静躺着在诱惑 12 | [00:30.89]我一个人在角落 13 | [00:34.80]没有你陪伴的我 14 | [00:38.78]连寂寞都笑我太堕落 15 | [00:43.80] 16 | [00:46.18]广场旁边的烟囱 17 | [00:50.00]烟雾弥漫你面容 18 | [00:53.73]我悄悄背诵你的温柔 19 | [01:00.95]喝着加温后的啤酒 20 | [01:05.21]这样唯美的镜头 21 | [01:09.05]是否只存在故事之中 22 | [01:15.17] 23 | [01:16.75]在你的身后 24 | [01:19.14]时间把过去都带走 25 | [01:22.94]时间把镜头带走不假思索 26 | [01:28.22]回忆不放手 27 | [01:30.70]好想再跟你牵着手 28 | [01:34.27]牵着你给我的温柔 29 | [01:38.07]哭过以后眼泪还是不停地流 30 | [01:45.25] 31 | [02:02.54]我一个人在角落 32 | [02:06.32]没有你陪伴的我 33 | [02:10.54]连寂寞都笑我太堕落 34 | [02:15.48] 35 | [02:17.85]广场旁边的烟囱 36 | [02:21.95]烟雾弥漫你面容 37 | [02:25.52]我悄悄背诵你的温柔 38 | [02:32.63]喝着加温后的啤酒 39 | [02:36.93]这样唯美的镜头 40 | [02:40.69]是否只存在故事之中 41 | [02:47.15] 42 | [02:48.37]在你的身后 43 | [02:50.85]时间把画面都带走 44 | [02:54.53]时间把镜头带走不假思索 45 | [02:59.90]回忆不放手 46 | [03:02.36]好想再跟你牵着手 47 | [03:06.03]牵着曾有过的温柔 48 | [03:09.84]哭过之后眼泪还是不停地流 49 | [03:17.32] 50 | [03:18.20]遇见彩虹 51 | [03:21.84]雨下过之后 52 | [03:25.46]街角出现彩虹 53 | [03:29.32]泪流干之后 54 | [03:33.99]有彩虹 55 | [03:36.44] -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Lrcs/309769.lrc: -------------------------------------------------------------------------------- 1 | [ti:一千年以后] 2 | [ar:林俊杰] 3 | [al:《编号89757》 ] 4 | 5 | [00:00.00] 6 | [00:02.00]一千年以后 7 | [00:04.00]作词:李瑞洵 作曲:林俊杰 8 | [00:06.00]演唱:林俊杰 9 | [00:12.00] 10 | [00:15.58]心 跳乱了节奏 11 | [00:19.76]梦也不自由 12 | [00:23.48]爱 是个绝对承诺 不说 13 | [00:29.48]撑到一千年以后 14 | [00:31.54]放任无奈 淹没尘埃 15 | [00:35.38]我在废墟之中守着你走来 Ho 16 | [00:39.34]我的泪光 承载不了 Ho 17 | [00:45.16]所有一切你要的爱 18 | [00:49.19] 19 | [00:49.65]因为在 一千年以后 20 | [00:54.46]世界早已没有我 21 | [00:58.46]无法深情挽着你的手 22 | [01:02.53]浅吻着你额头 23 | [01:05.67]别等到 一千年以后 24 | [01:10.04]所有人都遗忘了我 25 | [01:14.08]那时红色黄昏的沙漠 26 | [01:17.94]能有谁 解开缠绕千年的寂寞 27 | [01:25.04] 28 | [01:41.03]放任无奈 淹没尘埃 29 | [01:45.93]我在废墟之中守着你走来 Ho 30 | [01:50.12]我的泪光 承载不了 Ho 31 | [01:55.67]所有一切你需要的爱 32 | [02:00.46] 33 | [02:00.53]因为在 一千年以后 34 | [02:05.57]世界早已没有我 35 | [02:09.58]无法深情挽着你的手 36 | [02:13.71]浅吻着你额头 37 | [02:16.85]别等到 一千年以后 38 | [02:21.29]所有人都遗忘了我 39 | [02:25.13]那时红色黄昏的沙漠 40 | [02:29.11]能有谁 解开缠绕千年的寂寞 41 | [02:35.92] 42 | [02:48.58]无法深情挽着你的手 43 | [02:52.73]浅吻着你额头 44 | [02:55.87]别等到 一千年以后 45 | [03:00.33]所有人都遗忘了我 46 | [03:04.29]那时红色黄昏的沙漠 47 | [03:08.23]能有谁 解开缠绕千年的 寂寞 48 | [03:15.77]Ho 缠绕千年的寂寞 49 | [03:26.83] -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Lrcs/339744.lrc: -------------------------------------------------------------------------------- 1 | [ti:最佳損友] 2 | [ar:陳奕迅] 3 | [al:《Life Continues...》] 4 | 5 | [00:00.10]最佳損友 6 | [00:00.20]演唱:陳奕迅 7 | [00:00.30]專輯:《Life Continues...》 8 | [00:00.40]作詞:黃偉文 9 | [00:00.50]作曲:Eric Kwok 10 | [00:00.60] 11 | [00:00.64]朋友 我當你一秒朋友 12 | [00:06.47]朋友 我當你一世朋友 13 | [00:13.13]奇怪 過去再不堪回首 14 | [00:19.86]懷緬 時時其實還有 15 | [00:25.30] 16 | [00:26.51]朋友 你試過將我營救 17 | [00:33.11]朋友 你試過把我批鬥 18 | [00:39.77]無法 再與你交心聯手 19 | [00:46.08]畢竟難得 有過最佳損友 20 | [00:51.30] 21 | [00:51.64]從前共你 促膝把酒傾通宵都不夠 22 | [00:55.90]我有痛快過 你有沒有 23 | [01:00.12]很多東西 今生只可給你 24 | [01:02.61]保守至到永久 別人如何明白透 25 | [01:06.81]實實在在 踏入過我宇宙 26 | [01:09.59]即使相處到 有個裂口 27 | [01:12.97]命運決定了 以後再沒法聚頭 28 | [01:16.52]但說過去 卻那樣厚 29 | [01:18.81] 30 | [01:19.15]問我有沒有 確實也沒有 31 | [01:22.48]一直躲避的藉口 非甚麼大仇 32 | [01:25.75]為何舊知己 在最後 變不到老友 33 | [01:32.49]不知你是我敵友 已沒法望透 34 | [01:35.84]被推著走 跟著生活流 35 | [01:39.10]來年陌生的 是昨日 最親的某某 36 | [01:48.36] 37 | [01:50.25]生死之交 當天不知罕有 38 | [01:52.89]到你變節了 至覺未夠 39 | [01:56.99]多想一天 彼此都不追究 40 | [01:59.56]相邀再次渴酒 待葡萄成熟透 41 | [02:03.66]但是命運入面每個邂逅 42 | [02:06.32]一起走到了 某個路口 43 | [02:09.60]是敵與是友 各自也沒有自由 44 | [02:13.06]位置變了 各有隊友 45 | [02:15.56] 46 | [02:15.97]問我有沒有 確實也沒有 47 | [02:19.37]一直躲避的藉口 非甚麼大仇 48 | [02:22.40]為何舊知己 在最後 變不到老友 49 | [02:28.98]不知你是我敵友 已沒法望透 50 | [02:32.38]被推著走 跟著生活流 51 | [02:35.66]來年陌生的 是昨日 最親的某某 52 | [02:41.32]早知解散後 各自有 際遇作導游 53 | [02:45.75]奇就奇在 接受了 各自有路走 54 | [02:49.03]卻無人像 你讓我 眼淚背著流 55 | [02:52.46]嚴重似情侶 講分手 56 | [03:09.86] 57 | [03:10.29]有沒有 確實也沒有 58 | [03:12.55]一直躲避的藉口 非甚麼大仇 59 | [03:15.59]為何舊知己 在最後 變不到老友 60 | [03:22.34]不知你又有沒有 掛念這舊友 61 | [03:26.19]或者自己 早就想通透 62 | [03:29.30]來年陌生的 是昨日 最親的某某 63 | [03:34.51]總好於 那日我 沒有 沒有 遇過某某 64 | [03:45.51] -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Lrcs/月半小夜曲.lrc: -------------------------------------------------------------------------------- 1 | [ti:月半小夜曲] 2 | [ar:李克勤] 3 | [al:Purple dream] 4 | [00:00.00]月半小夜曲 李克勤 5 | [00:19.00]曲:河合奈保子 词:向雪怀 6 | [00:23.00]仍然倚在失眠夜望天边星宿 7 | [00:29.00]仍然听见小提琴如泣似诉再挑逗 8 | [00:35.00]为何只剩一弯月留在我的天空 9 | [00:42.00]这晚以后音讯隔绝 10 | [00:47.00]人如天上的明月是不可拥有 11 | [00:53.00]情如曲过只遗留无可挽救再分别 12 | [00:58.00]为何只是失望填密我的空虚 13 | [01:05.00]这晚夜没有吻别 14 | [01:11.00]仍在说永久想不到是借口 15 | [01:17.00]从未意会要分手 16 | [01:26.00]但我的心每分每刻仍然被她占有 17 | [01:33.00]她似这月儿仍然是不开口 18 | [01:37.00]提琴独奏独奏着明月半倚深秋 19 | [01:44.00]我的牵挂我的渴望 直至以后 20 | [02:19.00]仍然倚在失眠夜望天边星宿 21 | [02:25.00]仍然听见小提琴如泣似诉再挑逗 22 | [02:31.00]为何只剩一弯月留在我的天空 23 | [02:38.00]这晚以后音讯隔绝 24 | [02:43.00]人如天上的明月是不可拥有 25 | [02:49.00]情如曲过只遗留无可挽救再分别 26 | [02:55.00]为何只是失望填密我的空虚 27 | [03:02.00]这晚夜没有吻别 28 | [03:07.00]仍在说永久想不到是借口 29 | [03:13.00]从未意会要分手 30 | [03:22.00]但我的心每分每刻仍然被她占有 31 | [03:29.00]她似这月儿仍然是不开口 32 | [03:34.00]提琴独奏独奏着明月半倚深秋 33 | [03:40.00]我的牵挂我的渴望 直至以后 34 | [03:46.00]仍在说永久想不到是借口 35 | [03:52.00]从未意会要分手 36 | [04:01.00]但我的心每分每刻仍然被她占有 37 | [04:08.00]她似这月儿仍然是不开口 38 | [04:12.00]提琴独奏独奏着明月半倚深秋 39 | [04:19.00]我的牵挂我的渴望 直至以后 -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/MP3s/10405520.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/MP3s/10405520.mp3 -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/MP3s/10736444.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/MP3s/10736444.mp3 -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/MP3s/1201111234.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/MP3s/1201111234.mp3 -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/MP3s/120125029.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/MP3s/120125029.mp3 -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/MP3s/12309111.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/MP3s/12309111.mp3 -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/MP3s/14945107.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/MP3s/14945107.mp3 -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/MP3s/235319.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/MP3s/235319.mp3 -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/MP3s/255319.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/MP3s/255319.mp3 -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/MP3s/309769.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/MP3s/309769.mp3 -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/MP3s/339744.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AndyZhaoHe/QQMusic/ce641974c4f9f21357eba6799013dc194135ca62/QQMusic/QQMusic/Resources/MP3s/339744.mp3 -------------------------------------------------------------------------------- /QQMusic/QQMusic/Resources/Musics.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | name 7 | 月半小夜曲 8 | filename 9 | 1201111234.mp3 10 | lrcname 11 | 月半小夜曲.lrc 12 | singer 13 | 李克勤 14 | singerIcon 15 | lkq_icon.jpg 16 | icon 17 | lkq.jpg 18 | 19 | 20 | name 21 | 小苹果 22 | filename 23 | 120125029.mp3 24 | lrcname 25 | 120125029.lrc 26 | singer 27 | 筷子兄弟 28 | singerIcon 29 | kzxd_icon.jpg 30 | icon 31 | kzxd.jpg 32 | 33 | 34 | name 35 | 泡沫 36 | filename 37 | 14945107.mp3 38 | lrcname 39 | 14945107.lrc 40 | singer 41 | G.E.M.邓紫棋 42 | singerIcon 43 | dzq_icon.jpg 44 | icon 45 | dzq.jpg 46 | 47 | 48 | name 49 | I Want It That Way 50 | filename 51 | 12309111.mp3 52 | lrcname 53 | 12309111.lrc 54 | singer 55 | Backstreet Boys 56 | singerIcon 57 | bb_icon.jpg 58 | icon 59 | bb.jpg 60 | 61 | 62 | name 63 | 传奇 64 | filename 65 | 10405520.mp3 66 | lrcname 67 | 10405520.lrc 68 | singer 69 | 王菲 70 | singerIcon 71 | wf_icon.jpg 72 | icon 73 | wf.jpg 74 | 75 | 76 | name 77 | 简单爱 78 | filename 79 | 10736444.mp3 80 | lrcname 81 | 10736444.lrc 82 | singer 83 | 周杰伦 84 | singerIcon 85 | jay_icon.png 86 | icon 87 | jay.jpg 88 | 89 | 90 | name 91 | 瓦解 92 | filename 93 | 255319.mp3 94 | lrcname 95 | 255319.lrc 96 | singer 97 | 南拳妈妈 98 | singerIcon 99 | nanquan_icon.jpg 100 | icon 101 | nanquan.jpg 102 | 103 | 104 | name 105 | 心碎了无痕 106 | filename 107 | 235319.mp3 108 | lrcname 109 | 235319.lrc 110 | singer 111 | 张学友 112 | singerIcon 113 | zxy_icon.jpg 114 | icon 115 | zxy.jpg 116 | 117 | 118 | name 119 | 一千年以后 120 | filename 121 | 309769.mp3 122 | lrcname 123 | 309769.lrc 124 | singer 125 | 林俊杰 126 | singerIcon 127 | jj_icon.png 128 | icon 129 | jj.jpg 130 | 131 | 132 | name 133 | 最佳损友 134 | filename 135 | 339744.mp3 136 | lrcname 137 | 339744.lrc 138 | singer 139 | 陈奕迅 140 | singerIcon 141 | eason_icon.jpg 142 | icon 143 | eason.jpg 144 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /QQMusic/QQMusicTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | com.zhao.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /QQMusic/QQMusicTests/QQMusicTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // QQMusicTests.m 3 | // QQMusicTests 4 | // 5 | // Created by 赵赫 on 15/9/10. 6 | // Copyright (c) 2015年 Andyzhao. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface QQMusicTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation QQMusicTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # QQMusic 2 | 仿QQ音乐 3 | --------------------------------------------------------------------------------