├── YJMoreActionSheet.gif ├── Demo ├── YJMusicWaveView │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── pic_yinlang_blue.imageset │ │ │ ├── pic_yinlang_blue@2x.png │ │ │ ├── pic_yinlang_blue@3x.png │ │ │ └── Contents.json │ │ ├── pic_yinlang_gray.imageset │ │ │ ├── pic_yinlang_gray@2x.png │ │ │ ├── pic_yinlang_gray@3x.png │ │ │ └── Contents.json │ │ ├── pic_yinlang_white.imageset │ │ │ ├── pic_yinlang_white@2x.png │ │ │ ├── pic_yinlang_white@3x.png │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── ViewController.h │ ├── AppDelegate.h │ ├── main.m │ ├── YJMusicWaveView │ │ ├── YJMusicWaveView.h │ │ └── YJMusicWaveView.m │ ├── ViewController.m │ ├── Info.plist │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── AppDelegate.m ├── YJMusicWaveView.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcuserdata │ │ │ └── YJ.xcuserdatad │ │ │ │ └── UserInterfaceState.xcuserstate │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcuserdata │ │ └── YJ.xcuserdatad │ │ │ ├── xcschemes │ │ │ └── xcschememanagement.plist │ │ │ └── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ └── project.pbxproj ├── YJMusicWaveViewTests │ ├── Info.plist │ └── YJMusicWaveViewTests.m └── YJMusicWaveViewUITests │ ├── Info.plist │ └── YJMusicWaveViewUITests.m ├── YJMusicWaveView ├── YJMusicWaveView.h └── YJMusicWaveView.m └── README.md /YJMoreActionSheet.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjing901/YJMusicWaveView/HEAD/YJMoreActionSheet.gif -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/Assets.xcassets/pic_yinlang_blue.imageset/pic_yinlang_blue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjing901/YJMusicWaveView/HEAD/Demo/YJMusicWaveView/Assets.xcassets/pic_yinlang_blue.imageset/pic_yinlang_blue@2x.png -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/Assets.xcassets/pic_yinlang_blue.imageset/pic_yinlang_blue@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjing901/YJMusicWaveView/HEAD/Demo/YJMusicWaveView/Assets.xcassets/pic_yinlang_blue.imageset/pic_yinlang_blue@3x.png -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/Assets.xcassets/pic_yinlang_gray.imageset/pic_yinlang_gray@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjing901/YJMusicWaveView/HEAD/Demo/YJMusicWaveView/Assets.xcassets/pic_yinlang_gray.imageset/pic_yinlang_gray@2x.png -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/Assets.xcassets/pic_yinlang_gray.imageset/pic_yinlang_gray@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjing901/YJMusicWaveView/HEAD/Demo/YJMusicWaveView/Assets.xcassets/pic_yinlang_gray.imageset/pic_yinlang_gray@3x.png -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/Assets.xcassets/pic_yinlang_white.imageset/pic_yinlang_white@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjing901/YJMusicWaveView/HEAD/Demo/YJMusicWaveView/Assets.xcassets/pic_yinlang_white.imageset/pic_yinlang_white@2x.png -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/Assets.xcassets/pic_yinlang_white.imageset/pic_yinlang_white@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjing901/YJMusicWaveView/HEAD/Demo/YJMusicWaveView/Assets.xcassets/pic_yinlang_white.imageset/pic_yinlang_white@3x.png -------------------------------------------------------------------------------- /Demo/YJMusicWaveView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveView.xcodeproj/project.xcworkspace/xcuserdata/YJ.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yangjing901/YJMusicWaveView/HEAD/Demo/YJMusicWaveView.xcodeproj/project.xcworkspace/xcuserdata/YJ.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // YJMusicWaveView 4 | // 5 | // Created by YangJing on 2018/4/28. 6 | // Copyright © 2018年 YangJing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // YJMusicWaveView 4 | // 5 | // Created by YangJing on 2018/4/28. 6 | // Copyright © 2018年 YangJing. 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 | -------------------------------------------------------------------------------- /YJMusicWaveView/YJMusicWaveView.h: -------------------------------------------------------------------------------- 1 | // 2 | // YJMusicWaveView.h 3 | // YJMusicWaveView 4 | // 5 | // Created by YangJing on 2018/4/28. 6 | // Copyright © 2018年 YangJing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface YJMusicWaveView : UIView 12 | 13 | - (instancetype)initWithFrame:(CGRect)frame; 14 | 15 | - (void)startAnimation; 16 | 17 | - (void)stopAnimation; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // YJMusicWaveView 4 | // 5 | // Created by YangJing on 2018/4/28. 6 | // Copyright © 2018年 YangJing. 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 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/YJMusicWaveView/YJMusicWaveView.h: -------------------------------------------------------------------------------- 1 | // 2 | // YJMusicWaveView.h 3 | // YJMusicWaveView 4 | // 5 | // Created by YangJing on 2018/4/28. 6 | // Copyright © 2018年 YangJing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface YJMusicWaveView : UIView 12 | 13 | - (instancetype)initWithFrame:(CGRect)frame; 14 | 15 | - (void)startAnimation; 16 | 17 | - (void)stopAnimation; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/Assets.xcassets/pic_yinlang_blue.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "pic_yinlang_blue@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "pic_yinlang_blue@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/Assets.xcassets/pic_yinlang_gray.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "pic_yinlang_gray@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "pic_yinlang_gray@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/Assets.xcassets/pic_yinlang_white.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "pic_yinlang_white@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "pic_yinlang_white@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # YJMusicWaveView 2 | 3 | ## 效果图: 4 | ![Image text](https://github.com/yangjing901/YJMusicWaveView/blob/master/YJMoreActionSheet.gif) 5 | 6 | ## 原理: 7 | 1、将波形图片平铺作为scrollView的背景色,实现波形图的绘制; 8 | 9 | 2、俩层scrollView联动,上层scrollView比下层宽度小一点,实现波形图俩边的阴影效果; 10 | 11 | 3、创建一个蒙层,将蒙层加在上层的scrollview的layer上,动画实现蒙层的宽度渐变从0->scrollview.width,实现进度渐进效果; 12 | 13 | ## position与anchorPoint详解: 14 | 项目中涉及到一点锚点的运用,这块可以参考下面链接,讲得算是比较清晰易懂的了 15 | 16 | 参考:[position与anchorPoint详解](http://wonderffee.github.io/blog/2013/10/13/understand-anchorpoint-and-position/) 17 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveView.xcodeproj/xcuserdata/YJ.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | YJMusicWaveView.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | YJMusicWaveView.xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 0 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveView.xcodeproj/xcuserdata/YJ.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveViewTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveViewUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveViewTests/YJMusicWaveViewTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // YJMusicWaveViewTests.m 3 | // YJMusicWaveViewTests 4 | // 5 | // Created by YangJing on 2018/4/28. 6 | // Copyright © 2018年 YangJing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface YJMusicWaveViewTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation YJMusicWaveViewTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // YJMusicWaveView 4 | // 5 | // Created by YangJing on 2018/4/28. 6 | // Copyright © 2018年 YangJing. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "YJMusicWaveView.h" 11 | 12 | #define kScreenWidth CGRectGetWidth([UIScreen mainScreen].bounds) 13 | #define kScreenHeight CGRectGetHeight([UIScreen mainScreen].bounds) 14 | 15 | @interface ViewController () 16 | 17 | @end 18 | 19 | @implementation ViewController 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | // Do any additional setup after loading the view, typically from a nib. 24 | self.view.backgroundColor = [UIColor blackColor]; 25 | 26 | YJMusicWaveView *waveView = [[YJMusicWaveView alloc] initWithFrame:CGRectMake(0, kScreenHeight/2-25, kScreenWidth, 50)]; 27 | [self.view addSubview:waveView]; 28 | 29 | [waveView startAnimation]; 30 | } 31 | 32 | 33 | - (void)didReceiveMemoryWarning { 34 | [super didReceiveMemoryWarning]; 35 | // Dispose of any resources that can be recreated. 36 | } 37 | 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveViewUITests/YJMusicWaveViewUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // YJMusicWaveViewUITests.m 3 | // YJMusicWaveViewUITests 4 | // 5 | // Created by YangJing on 2018/4/28. 6 | // Copyright © 2018年 YangJing. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface YJMusicWaveViewUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation YJMusicWaveViewUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 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 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 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 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // YJMusicWaveView 4 | // 5 | // Created by YangJing on 2018/4/28. 6 | // Copyright © 2018年 YangJing. 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 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // 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. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // 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. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // 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. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /YJMusicWaveView/YJMusicWaveView.m: -------------------------------------------------------------------------------- 1 | // 2 | // YJMusicWaveView.m 3 | // YJMusicWaveView 4 | // 5 | // Created by YangJing on 2018/4/28. 6 | // Copyright © 2018年 YangJing. All rights reserved. 7 | // 8 | 9 | #import "YJMusicWaveView.h" 10 | 11 | @interface YJMusicWaveView () 12 | 13 | @end 14 | 15 | @implementation YJMusicWaveView { 16 | UIScrollView *_backScrollView; 17 | UIScrollView *_scrollView; 18 | 19 | CALayer *_maskLayer; 20 | } 21 | 22 | - (instancetype)initWithFrame:(CGRect)frame { 23 | self = [super initWithFrame:frame]; 24 | if (self) { 25 | [self configSubview]; 26 | } 27 | return self; 28 | } 29 | 30 | //MARK: - private methods 31 | - (void)startAnimation { 32 | 33 | NSLog(@"yangjing_test: %.2f", _scrollView.contentOffset.x); 34 | 35 | [_maskLayer removeAllAnimations]; 36 | [_maskLayer removeFromSuperlayer]; 37 | 38 | UIImage *image3 = [UIImage imageNamed:@"pic_yinlang_blue"]; 39 | _maskLayer = [CALayer new]; 40 | _maskLayer.frame = CGRectMake(0, 0, 0, 0); 41 | _maskLayer.anchorPoint = CGPointMake(0, 0);//单独使用bounds动画,大小改变,中心点不变,需要调整锚点使蒙层的锚点在(0,0)位置(默认锚点为(0.5, 0.5)) 42 | _maskLayer.backgroundColor = [UIColor colorWithPatternImage:image3].CGColor;//这种方法绘制背景色比较耗内存,图片尽量小点 43 | [_scrollView.layer addSublayer:_maskLayer]; 44 | 45 | CABasicAnimation *widthAnimation = [CABasicAnimation animationWithKeyPath:@"bounds"]; 46 | widthAnimation.fromValue = [NSValue valueWithCGRect:CGRectMake(0, 0, _scrollView.contentOffset.x, 50)]; 47 | widthAnimation.toValue = [NSValue valueWithCGRect:CGRectMake(0, 0, _scrollView.contentOffset.x+self.bounds.size.width-40, 50)]; 48 | widthAnimation.duration = 60; 49 | widthAnimation.repeatCount = HUGE_VALF; //无限循环 50 | [_maskLayer addAnimation:widthAnimation forKey:@"coverScroll"]; 51 | } 52 | 53 | - (void)stopAnimation { 54 | [_maskLayer removeAllAnimations]; 55 | [_maskLayer removeFromSuperlayer]; 56 | } 57 | 58 | //MARK: - scrollViewDelegate 59 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView { 60 | //scrollView联动 61 | if ([scrollView isEqual:_scrollView]) { 62 | _backScrollView.contentOffset = CGPointMake(_scrollView.contentOffset.x-20, _scrollView.contentOffset.y) ; 63 | 64 | [self stopAnimation]; 65 | 66 | } 67 | } 68 | 69 | - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { 70 | [self startAnimation]; 71 | } 72 | 73 | - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { 74 | if (!decelerate) { 75 | [self startAnimation]; 76 | } 77 | } 78 | 79 | - (void)configSubview { 80 | UIImage *image = [UIImage imageNamed:@"pic_yinlang_gray"]; 81 | _backScrollView = [[UIScrollView alloc] init]; 82 | [self addSubview:_backScrollView]; 83 | _backScrollView.userInteractionEnabled = NO; 84 | _backScrollView.frame = CGRectMake(0, 0, self.bounds.size.width, 50); 85 | _backScrollView.contentSize = CGSizeMake(self.bounds.size.width*2, 0); 86 | _backScrollView.backgroundColor = [UIColor colorWithPatternImage:image];//这种方法绘制背景色比较耗内存,图片尽量小点 87 | _backScrollView.contentOffset = CGPointMake(-20, 0); 88 | 89 | UIImage *image2 = [UIImage imageNamed:@"pic_yinlang_white"]; 90 | _scrollView = [[UIScrollView alloc] init]; 91 | [self addSubview:_scrollView]; 92 | _scrollView.frame = CGRectMake(20, 0, self.bounds.size.width-40, 50); 93 | _scrollView.contentSize = CGSizeMake(self.bounds.size.width*2, 0); 94 | _scrollView.backgroundColor = [UIColor colorWithPatternImage:image2];//这种方法绘制背景色比较耗内存,图片尽量小点 95 | _scrollView.delegate = self; 96 | } 97 | 98 | 99 | 100 | @end 101 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveView/YJMusicWaveView/YJMusicWaveView.m: -------------------------------------------------------------------------------- 1 | // 2 | // YJMusicWaveView.m 3 | // YJMusicWaveView 4 | // 5 | // Created by YangJing on 2018/4/28. 6 | // Copyright © 2018年 YangJing. All rights reserved. 7 | // 8 | 9 | #import "YJMusicWaveView.h" 10 | 11 | @interface YJMusicWaveView () 12 | 13 | @end 14 | 15 | @implementation YJMusicWaveView { 16 | UIScrollView *_backScrollView; 17 | UIScrollView *_scrollView; 18 | 19 | CALayer *_maskLayer; 20 | } 21 | 22 | - (instancetype)initWithFrame:(CGRect)frame { 23 | self = [super initWithFrame:frame]; 24 | if (self) { 25 | [self configSubview]; 26 | } 27 | return self; 28 | } 29 | 30 | //MARK: - private methods 31 | - (void)startAnimation { 32 | 33 | NSLog(@"yangjing_test: %.2f", _scrollView.contentOffset.x); 34 | 35 | [_maskLayer removeAllAnimations]; 36 | [_maskLayer removeFromSuperlayer]; 37 | 38 | UIImage *image3 = [UIImage imageNamed:@"pic_yinlang_blue"]; 39 | _maskLayer = [CALayer new]; 40 | _maskLayer.frame = CGRectMake(-(_scrollView.contentOffset.x)/2, 0, _scrollView.contentOffset.x, 50); 41 | _maskLayer.anchorPoint = CGPointMake(0, 0.5);//单独使用bounds动画,大小改变,中心点不变,需要调整锚点使蒙层的锚点在(0,0.5)位置(默认锚点为(0.5, 0.5)) 42 | _maskLayer.backgroundColor = [UIColor colorWithPatternImage:image3].CGColor;//这种方法绘制背景色比较耗内存,图片尽量小点 43 | [_scrollView.layer addSublayer:_maskLayer]; 44 | 45 | CABasicAnimation *widthAnimation = [CABasicAnimation animationWithKeyPath:@"bounds"]; 46 | widthAnimation.fromValue = [NSValue valueWithCGRect:CGRectMake(0, 0, _scrollView.contentOffset.x, 50)]; 47 | widthAnimation.toValue = [NSValue valueWithCGRect:CGRectMake(0, 0, _scrollView.contentOffset.x+self.bounds.size.width-40, 50)]; 48 | widthAnimation.duration = 60; 49 | widthAnimation.repeatCount = HUGE_VALF; //无限循环 50 | [_maskLayer addAnimation:widthAnimation forKey:@"coverScroll"]; 51 | } 52 | 53 | - (void)stopAnimation { 54 | [_maskLayer removeAllAnimations]; 55 | [_maskLayer removeFromSuperlayer]; 56 | } 57 | 58 | //MARK: - scrollViewDelegate 59 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView { 60 | //scrollView联动 61 | if ([scrollView isEqual:_scrollView]) { 62 | _backScrollView.contentOffset = CGPointMake(_scrollView.contentOffset.x-20, _scrollView.contentOffset.y) ; 63 | 64 | [self stopAnimation]; 65 | 66 | } 67 | } 68 | 69 | - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { 70 | [self startAnimation]; 71 | } 72 | 73 | - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate { 74 | if (!decelerate) { 75 | [self startAnimation]; 76 | } 77 | } 78 | 79 | - (void)configSubview { 80 | UIImage *image = [UIImage imageNamed:@"pic_yinlang_gray"]; 81 | _backScrollView = [[UIScrollView alloc] init]; 82 | [self addSubview:_backScrollView]; 83 | _backScrollView.userInteractionEnabled = NO; 84 | _backScrollView.frame = CGRectMake(0, 0, self.bounds.size.width, 50); 85 | _backScrollView.contentSize = CGSizeMake(self.bounds.size.width*2, 0); 86 | _backScrollView.backgroundColor = [UIColor colorWithPatternImage:image];//这种方法绘制背景色比较耗内存,图片尽量小点 87 | _backScrollView.contentOffset = CGPointMake(-20, 0); 88 | 89 | UIImage *image2 = [UIImage imageNamed:@"pic_yinlang_white"]; 90 | _scrollView = [[UIScrollView alloc] init]; 91 | [self addSubview:_scrollView]; 92 | _scrollView.frame = CGRectMake(20, 0, self.bounds.size.width-40, 50); 93 | _scrollView.contentSize = CGSizeMake(self.bounds.size.width*2, 0); 94 | _scrollView.backgroundColor = [UIColor colorWithPatternImage:image2];//这种方法绘制背景色比较耗内存,图片尽量小点 95 | _scrollView.delegate = self; 96 | } 97 | 98 | 99 | 100 | @end 101 | -------------------------------------------------------------------------------- /Demo/YJMusicWaveView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 399A1B4A20943FAA00B28ECC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 399A1B4920943FAA00B28ECC /* AppDelegate.m */; }; 11 | 399A1B4D20943FAA00B28ECC /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 399A1B4C20943FAA00B28ECC /* ViewController.m */; }; 12 | 399A1B5020943FAA00B28ECC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 399A1B4E20943FAA00B28ECC /* Main.storyboard */; }; 13 | 399A1B5220943FAC00B28ECC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 399A1B5120943FAC00B28ECC /* Assets.xcassets */; }; 14 | 399A1B5520943FAC00B28ECC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 399A1B5320943FAC00B28ECC /* LaunchScreen.storyboard */; }; 15 | 399A1B5820943FAC00B28ECC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 399A1B5720943FAC00B28ECC /* main.m */; }; 16 | 399A1B6220943FAC00B28ECC /* YJMusicWaveViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 399A1B6120943FAC00B28ECC /* YJMusicWaveViewTests.m */; }; 17 | 399A1B6D20943FAC00B28ECC /* YJMusicWaveViewUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 399A1B6C20943FAC00B28ECC /* YJMusicWaveViewUITests.m */; }; 18 | 399A1B7D20943FD400B28ECC /* YJMusicWaveView.m in Sources */ = {isa = PBXBuildFile; fileRef = 399A1B7C20943FD400B28ECC /* YJMusicWaveView.m */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 399A1B5E20943FAC00B28ECC /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 399A1B3D20943FAA00B28ECC /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 399A1B4420943FAA00B28ECC; 27 | remoteInfo = YJMusicWaveView; 28 | }; 29 | 399A1B6920943FAC00B28ECC /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 399A1B3D20943FAA00B28ECC /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = 399A1B4420943FAA00B28ECC; 34 | remoteInfo = YJMusicWaveView; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 399A1B4520943FAA00B28ECC /* YJMusicWaveView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YJMusicWaveView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 399A1B4820943FAA00B28ECC /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 41 | 399A1B4920943FAA00B28ECC /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 42 | 399A1B4B20943FAA00B28ECC /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 43 | 399A1B4C20943FAA00B28ECC /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 44 | 399A1B4F20943FAA00B28ECC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 45 | 399A1B5120943FAC00B28ECC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 46 | 399A1B5420943FAC00B28ECC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 47 | 399A1B5620943FAC00B28ECC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | 399A1B5720943FAC00B28ECC /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 49 | 399A1B5D20943FAC00B28ECC /* YJMusicWaveViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = YJMusicWaveViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 399A1B6120943FAC00B28ECC /* YJMusicWaveViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YJMusicWaveViewTests.m; sourceTree = ""; }; 51 | 399A1B6320943FAC00B28ECC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 399A1B6820943FAC00B28ECC /* YJMusicWaveViewUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = YJMusicWaveViewUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 399A1B6C20943FAC00B28ECC /* YJMusicWaveViewUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YJMusicWaveViewUITests.m; sourceTree = ""; }; 54 | 399A1B6E20943FAC00B28ECC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 399A1B7B20943FD400B28ECC /* YJMusicWaveView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YJMusicWaveView.h; sourceTree = ""; }; 56 | 399A1B7C20943FD400B28ECC /* YJMusicWaveView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = YJMusicWaveView.m; sourceTree = ""; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | 399A1B4220943FAA00B28ECC /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | 399A1B5A20943FAC00B28ECC /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | 399A1B6520943FAC00B28ECC /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | /* End PBXFrameworksBuildPhase section */ 82 | 83 | /* Begin PBXGroup section */ 84 | 399A1B3C20943FAA00B28ECC = { 85 | isa = PBXGroup; 86 | children = ( 87 | 399A1B4720943FAA00B28ECC /* YJMusicWaveView */, 88 | 399A1B6020943FAC00B28ECC /* YJMusicWaveViewTests */, 89 | 399A1B6B20943FAC00B28ECC /* YJMusicWaveViewUITests */, 90 | 399A1B4620943FAA00B28ECC /* Products */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 399A1B4620943FAA00B28ECC /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 399A1B4520943FAA00B28ECC /* YJMusicWaveView.app */, 98 | 399A1B5D20943FAC00B28ECC /* YJMusicWaveViewTests.xctest */, 99 | 399A1B6820943FAC00B28ECC /* YJMusicWaveViewUITests.xctest */, 100 | ); 101 | name = Products; 102 | sourceTree = ""; 103 | }; 104 | 399A1B4720943FAA00B28ECC /* YJMusicWaveView */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 399A1B7A20943FC700B28ECC /* YJMusicWaveView */, 108 | 399A1B4820943FAA00B28ECC /* AppDelegate.h */, 109 | 399A1B4920943FAA00B28ECC /* AppDelegate.m */, 110 | 399A1B4B20943FAA00B28ECC /* ViewController.h */, 111 | 399A1B4C20943FAA00B28ECC /* ViewController.m */, 112 | 399A1B4E20943FAA00B28ECC /* Main.storyboard */, 113 | 399A1B5120943FAC00B28ECC /* Assets.xcassets */, 114 | 399A1B5320943FAC00B28ECC /* LaunchScreen.storyboard */, 115 | 399A1B5620943FAC00B28ECC /* Info.plist */, 116 | 399A1B5720943FAC00B28ECC /* main.m */, 117 | ); 118 | path = YJMusicWaveView; 119 | sourceTree = ""; 120 | }; 121 | 399A1B6020943FAC00B28ECC /* YJMusicWaveViewTests */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 399A1B6120943FAC00B28ECC /* YJMusicWaveViewTests.m */, 125 | 399A1B6320943FAC00B28ECC /* Info.plist */, 126 | ); 127 | path = YJMusicWaveViewTests; 128 | sourceTree = ""; 129 | }; 130 | 399A1B6B20943FAC00B28ECC /* YJMusicWaveViewUITests */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 399A1B6C20943FAC00B28ECC /* YJMusicWaveViewUITests.m */, 134 | 399A1B6E20943FAC00B28ECC /* Info.plist */, 135 | ); 136 | path = YJMusicWaveViewUITests; 137 | sourceTree = ""; 138 | }; 139 | 399A1B7A20943FC700B28ECC /* YJMusicWaveView */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | 399A1B7B20943FD400B28ECC /* YJMusicWaveView.h */, 143 | 399A1B7C20943FD400B28ECC /* YJMusicWaveView.m */, 144 | ); 145 | path = YJMusicWaveView; 146 | sourceTree = ""; 147 | }; 148 | /* End PBXGroup section */ 149 | 150 | /* Begin PBXNativeTarget section */ 151 | 399A1B4420943FAA00B28ECC /* YJMusicWaveView */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = 399A1B7120943FAC00B28ECC /* Build configuration list for PBXNativeTarget "YJMusicWaveView" */; 154 | buildPhases = ( 155 | 399A1B4120943FAA00B28ECC /* Sources */, 156 | 399A1B4220943FAA00B28ECC /* Frameworks */, 157 | 399A1B4320943FAA00B28ECC /* Resources */, 158 | ); 159 | buildRules = ( 160 | ); 161 | dependencies = ( 162 | ); 163 | name = YJMusicWaveView; 164 | productName = YJMusicWaveView; 165 | productReference = 399A1B4520943FAA00B28ECC /* YJMusicWaveView.app */; 166 | productType = "com.apple.product-type.application"; 167 | }; 168 | 399A1B5C20943FAC00B28ECC /* YJMusicWaveViewTests */ = { 169 | isa = PBXNativeTarget; 170 | buildConfigurationList = 399A1B7420943FAC00B28ECC /* Build configuration list for PBXNativeTarget "YJMusicWaveViewTests" */; 171 | buildPhases = ( 172 | 399A1B5920943FAC00B28ECC /* Sources */, 173 | 399A1B5A20943FAC00B28ECC /* Frameworks */, 174 | 399A1B5B20943FAC00B28ECC /* Resources */, 175 | ); 176 | buildRules = ( 177 | ); 178 | dependencies = ( 179 | 399A1B5F20943FAC00B28ECC /* PBXTargetDependency */, 180 | ); 181 | name = YJMusicWaveViewTests; 182 | productName = YJMusicWaveViewTests; 183 | productReference = 399A1B5D20943FAC00B28ECC /* YJMusicWaveViewTests.xctest */; 184 | productType = "com.apple.product-type.bundle.unit-test"; 185 | }; 186 | 399A1B6720943FAC00B28ECC /* YJMusicWaveViewUITests */ = { 187 | isa = PBXNativeTarget; 188 | buildConfigurationList = 399A1B7720943FAC00B28ECC /* Build configuration list for PBXNativeTarget "YJMusicWaveViewUITests" */; 189 | buildPhases = ( 190 | 399A1B6420943FAC00B28ECC /* Sources */, 191 | 399A1B6520943FAC00B28ECC /* Frameworks */, 192 | 399A1B6620943FAC00B28ECC /* Resources */, 193 | ); 194 | buildRules = ( 195 | ); 196 | dependencies = ( 197 | 399A1B6A20943FAC00B28ECC /* PBXTargetDependency */, 198 | ); 199 | name = YJMusicWaveViewUITests; 200 | productName = YJMusicWaveViewUITests; 201 | productReference = 399A1B6820943FAC00B28ECC /* YJMusicWaveViewUITests.xctest */; 202 | productType = "com.apple.product-type.bundle.ui-testing"; 203 | }; 204 | /* End PBXNativeTarget section */ 205 | 206 | /* Begin PBXProject section */ 207 | 399A1B3D20943FAA00B28ECC /* Project object */ = { 208 | isa = PBXProject; 209 | attributes = { 210 | LastUpgradeCheck = 0930; 211 | ORGANIZATIONNAME = YangJing; 212 | TargetAttributes = { 213 | 399A1B4420943FAA00B28ECC = { 214 | CreatedOnToolsVersion = 9.3; 215 | }; 216 | 399A1B5C20943FAC00B28ECC = { 217 | CreatedOnToolsVersion = 9.3; 218 | TestTargetID = 399A1B4420943FAA00B28ECC; 219 | }; 220 | 399A1B6720943FAC00B28ECC = { 221 | CreatedOnToolsVersion = 9.3; 222 | TestTargetID = 399A1B4420943FAA00B28ECC; 223 | }; 224 | }; 225 | }; 226 | buildConfigurationList = 399A1B4020943FAA00B28ECC /* Build configuration list for PBXProject "YJMusicWaveView" */; 227 | compatibilityVersion = "Xcode 9.3"; 228 | developmentRegion = en; 229 | hasScannedForEncodings = 0; 230 | knownRegions = ( 231 | en, 232 | Base, 233 | ); 234 | mainGroup = 399A1B3C20943FAA00B28ECC; 235 | productRefGroup = 399A1B4620943FAA00B28ECC /* Products */; 236 | projectDirPath = ""; 237 | projectRoot = ""; 238 | targets = ( 239 | 399A1B4420943FAA00B28ECC /* YJMusicWaveView */, 240 | 399A1B5C20943FAC00B28ECC /* YJMusicWaveViewTests */, 241 | 399A1B6720943FAC00B28ECC /* YJMusicWaveViewUITests */, 242 | ); 243 | }; 244 | /* End PBXProject section */ 245 | 246 | /* Begin PBXResourcesBuildPhase section */ 247 | 399A1B4320943FAA00B28ECC /* Resources */ = { 248 | isa = PBXResourcesBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | 399A1B5520943FAC00B28ECC /* LaunchScreen.storyboard in Resources */, 252 | 399A1B5220943FAC00B28ECC /* Assets.xcassets in Resources */, 253 | 399A1B5020943FAA00B28ECC /* Main.storyboard in Resources */, 254 | ); 255 | runOnlyForDeploymentPostprocessing = 0; 256 | }; 257 | 399A1B5B20943FAC00B28ECC /* Resources */ = { 258 | isa = PBXResourcesBuildPhase; 259 | buildActionMask = 2147483647; 260 | files = ( 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | 399A1B6620943FAC00B28ECC /* Resources */ = { 265 | isa = PBXResourcesBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | }; 271 | /* End PBXResourcesBuildPhase section */ 272 | 273 | /* Begin PBXSourcesBuildPhase section */ 274 | 399A1B4120943FAA00B28ECC /* Sources */ = { 275 | isa = PBXSourcesBuildPhase; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | 399A1B4D20943FAA00B28ECC /* ViewController.m in Sources */, 279 | 399A1B5820943FAC00B28ECC /* main.m in Sources */, 280 | 399A1B7D20943FD400B28ECC /* YJMusicWaveView.m in Sources */, 281 | 399A1B4A20943FAA00B28ECC /* AppDelegate.m in Sources */, 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | }; 285 | 399A1B5920943FAC00B28ECC /* Sources */ = { 286 | isa = PBXSourcesBuildPhase; 287 | buildActionMask = 2147483647; 288 | files = ( 289 | 399A1B6220943FAC00B28ECC /* YJMusicWaveViewTests.m in Sources */, 290 | ); 291 | runOnlyForDeploymentPostprocessing = 0; 292 | }; 293 | 399A1B6420943FAC00B28ECC /* Sources */ = { 294 | isa = PBXSourcesBuildPhase; 295 | buildActionMask = 2147483647; 296 | files = ( 297 | 399A1B6D20943FAC00B28ECC /* YJMusicWaveViewUITests.m in Sources */, 298 | ); 299 | runOnlyForDeploymentPostprocessing = 0; 300 | }; 301 | /* End PBXSourcesBuildPhase section */ 302 | 303 | /* Begin PBXTargetDependency section */ 304 | 399A1B5F20943FAC00B28ECC /* PBXTargetDependency */ = { 305 | isa = PBXTargetDependency; 306 | target = 399A1B4420943FAA00B28ECC /* YJMusicWaveView */; 307 | targetProxy = 399A1B5E20943FAC00B28ECC /* PBXContainerItemProxy */; 308 | }; 309 | 399A1B6A20943FAC00B28ECC /* PBXTargetDependency */ = { 310 | isa = PBXTargetDependency; 311 | target = 399A1B4420943FAA00B28ECC /* YJMusicWaveView */; 312 | targetProxy = 399A1B6920943FAC00B28ECC /* PBXContainerItemProxy */; 313 | }; 314 | /* End PBXTargetDependency section */ 315 | 316 | /* Begin PBXVariantGroup section */ 317 | 399A1B4E20943FAA00B28ECC /* Main.storyboard */ = { 318 | isa = PBXVariantGroup; 319 | children = ( 320 | 399A1B4F20943FAA00B28ECC /* Base */, 321 | ); 322 | name = Main.storyboard; 323 | sourceTree = ""; 324 | }; 325 | 399A1B5320943FAC00B28ECC /* LaunchScreen.storyboard */ = { 326 | isa = PBXVariantGroup; 327 | children = ( 328 | 399A1B5420943FAC00B28ECC /* Base */, 329 | ); 330 | name = LaunchScreen.storyboard; 331 | sourceTree = ""; 332 | }; 333 | /* End PBXVariantGroup section */ 334 | 335 | /* Begin XCBuildConfiguration section */ 336 | 399A1B6F20943FAC00B28ECC /* Debug */ = { 337 | isa = XCBuildConfiguration; 338 | buildSettings = { 339 | ALWAYS_SEARCH_USER_PATHS = NO; 340 | CLANG_ANALYZER_NONNULL = YES; 341 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 342 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 343 | CLANG_CXX_LIBRARY = "libc++"; 344 | CLANG_ENABLE_MODULES = YES; 345 | CLANG_ENABLE_OBJC_ARC = YES; 346 | CLANG_ENABLE_OBJC_WEAK = YES; 347 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 348 | CLANG_WARN_BOOL_CONVERSION = YES; 349 | CLANG_WARN_COMMA = YES; 350 | CLANG_WARN_CONSTANT_CONVERSION = YES; 351 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 352 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 353 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 354 | CLANG_WARN_EMPTY_BODY = YES; 355 | CLANG_WARN_ENUM_CONVERSION = YES; 356 | CLANG_WARN_INFINITE_RECURSION = YES; 357 | CLANG_WARN_INT_CONVERSION = YES; 358 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 359 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 360 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 361 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 362 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 363 | CLANG_WARN_STRICT_PROTOTYPES = YES; 364 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 365 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 366 | CLANG_WARN_UNREACHABLE_CODE = YES; 367 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 368 | CODE_SIGN_IDENTITY = "iPhone Developer"; 369 | COPY_PHASE_STRIP = NO; 370 | DEBUG_INFORMATION_FORMAT = dwarf; 371 | ENABLE_STRICT_OBJC_MSGSEND = YES; 372 | ENABLE_TESTABILITY = YES; 373 | GCC_C_LANGUAGE_STANDARD = gnu11; 374 | GCC_DYNAMIC_NO_PIC = NO; 375 | GCC_NO_COMMON_BLOCKS = YES; 376 | GCC_OPTIMIZATION_LEVEL = 0; 377 | GCC_PREPROCESSOR_DEFINITIONS = ( 378 | "DEBUG=1", 379 | "$(inherited)", 380 | ); 381 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 382 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 383 | GCC_WARN_UNDECLARED_SELECTOR = YES; 384 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 385 | GCC_WARN_UNUSED_FUNCTION = YES; 386 | GCC_WARN_UNUSED_VARIABLE = YES; 387 | IPHONEOS_DEPLOYMENT_TARGET = 11.3; 388 | MTL_ENABLE_DEBUG_INFO = YES; 389 | ONLY_ACTIVE_ARCH = YES; 390 | SDKROOT = iphoneos; 391 | }; 392 | name = Debug; 393 | }; 394 | 399A1B7020943FAC00B28ECC /* Release */ = { 395 | isa = XCBuildConfiguration; 396 | buildSettings = { 397 | ALWAYS_SEARCH_USER_PATHS = NO; 398 | CLANG_ANALYZER_NONNULL = YES; 399 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 400 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 401 | CLANG_CXX_LIBRARY = "libc++"; 402 | CLANG_ENABLE_MODULES = YES; 403 | CLANG_ENABLE_OBJC_ARC = YES; 404 | CLANG_ENABLE_OBJC_WEAK = YES; 405 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 406 | CLANG_WARN_BOOL_CONVERSION = YES; 407 | CLANG_WARN_COMMA = YES; 408 | CLANG_WARN_CONSTANT_CONVERSION = YES; 409 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 410 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 411 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 412 | CLANG_WARN_EMPTY_BODY = YES; 413 | CLANG_WARN_ENUM_CONVERSION = YES; 414 | CLANG_WARN_INFINITE_RECURSION = YES; 415 | CLANG_WARN_INT_CONVERSION = YES; 416 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 417 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 418 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 419 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 420 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 421 | CLANG_WARN_STRICT_PROTOTYPES = YES; 422 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 423 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 424 | CLANG_WARN_UNREACHABLE_CODE = YES; 425 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 426 | CODE_SIGN_IDENTITY = "iPhone Developer"; 427 | COPY_PHASE_STRIP = NO; 428 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 429 | ENABLE_NS_ASSERTIONS = NO; 430 | ENABLE_STRICT_OBJC_MSGSEND = YES; 431 | GCC_C_LANGUAGE_STANDARD = gnu11; 432 | GCC_NO_COMMON_BLOCKS = YES; 433 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 434 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 435 | GCC_WARN_UNDECLARED_SELECTOR = YES; 436 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 437 | GCC_WARN_UNUSED_FUNCTION = YES; 438 | GCC_WARN_UNUSED_VARIABLE = YES; 439 | IPHONEOS_DEPLOYMENT_TARGET = 11.3; 440 | MTL_ENABLE_DEBUG_INFO = NO; 441 | SDKROOT = iphoneos; 442 | VALIDATE_PRODUCT = YES; 443 | }; 444 | name = Release; 445 | }; 446 | 399A1B7220943FAC00B28ECC /* Debug */ = { 447 | isa = XCBuildConfiguration; 448 | buildSettings = { 449 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 450 | CODE_SIGN_STYLE = Automatic; 451 | DEVELOPMENT_TEAM = 475L2MZD72; 452 | INFOPLIST_FILE = YJMusicWaveView/Info.plist; 453 | LD_RUNPATH_SEARCH_PATHS = ( 454 | "$(inherited)", 455 | "@executable_path/Frameworks", 456 | ); 457 | PRODUCT_BUNDLE_IDENTIFIER = yangjing.YJMusicWaveView; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | TARGETED_DEVICE_FAMILY = "1,2"; 460 | }; 461 | name = Debug; 462 | }; 463 | 399A1B7320943FAC00B28ECC /* Release */ = { 464 | isa = XCBuildConfiguration; 465 | buildSettings = { 466 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 467 | CODE_SIGN_STYLE = Automatic; 468 | DEVELOPMENT_TEAM = 475L2MZD72; 469 | INFOPLIST_FILE = YJMusicWaveView/Info.plist; 470 | LD_RUNPATH_SEARCH_PATHS = ( 471 | "$(inherited)", 472 | "@executable_path/Frameworks", 473 | ); 474 | PRODUCT_BUNDLE_IDENTIFIER = yangjing.YJMusicWaveView; 475 | PRODUCT_NAME = "$(TARGET_NAME)"; 476 | TARGETED_DEVICE_FAMILY = "1,2"; 477 | }; 478 | name = Release; 479 | }; 480 | 399A1B7520943FAC00B28ECC /* Debug */ = { 481 | isa = XCBuildConfiguration; 482 | buildSettings = { 483 | BUNDLE_LOADER = "$(TEST_HOST)"; 484 | CODE_SIGN_STYLE = Automatic; 485 | DEVELOPMENT_TEAM = 475L2MZD72; 486 | INFOPLIST_FILE = YJMusicWaveViewTests/Info.plist; 487 | LD_RUNPATH_SEARCH_PATHS = ( 488 | "$(inherited)", 489 | "@executable_path/Frameworks", 490 | "@loader_path/Frameworks", 491 | ); 492 | PRODUCT_BUNDLE_IDENTIFIER = yangjing.YJMusicWaveViewTests; 493 | PRODUCT_NAME = "$(TARGET_NAME)"; 494 | TARGETED_DEVICE_FAMILY = "1,2"; 495 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YJMusicWaveView.app/YJMusicWaveView"; 496 | }; 497 | name = Debug; 498 | }; 499 | 399A1B7620943FAC00B28ECC /* Release */ = { 500 | isa = XCBuildConfiguration; 501 | buildSettings = { 502 | BUNDLE_LOADER = "$(TEST_HOST)"; 503 | CODE_SIGN_STYLE = Automatic; 504 | DEVELOPMENT_TEAM = 475L2MZD72; 505 | INFOPLIST_FILE = YJMusicWaveViewTests/Info.plist; 506 | LD_RUNPATH_SEARCH_PATHS = ( 507 | "$(inherited)", 508 | "@executable_path/Frameworks", 509 | "@loader_path/Frameworks", 510 | ); 511 | PRODUCT_BUNDLE_IDENTIFIER = yangjing.YJMusicWaveViewTests; 512 | PRODUCT_NAME = "$(TARGET_NAME)"; 513 | TARGETED_DEVICE_FAMILY = "1,2"; 514 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/YJMusicWaveView.app/YJMusicWaveView"; 515 | }; 516 | name = Release; 517 | }; 518 | 399A1B7820943FAC00B28ECC /* Debug */ = { 519 | isa = XCBuildConfiguration; 520 | buildSettings = { 521 | CODE_SIGN_STYLE = Automatic; 522 | DEVELOPMENT_TEAM = 475L2MZD72; 523 | INFOPLIST_FILE = YJMusicWaveViewUITests/Info.plist; 524 | LD_RUNPATH_SEARCH_PATHS = ( 525 | "$(inherited)", 526 | "@executable_path/Frameworks", 527 | "@loader_path/Frameworks", 528 | ); 529 | PRODUCT_BUNDLE_IDENTIFIER = yangjing.YJMusicWaveViewUITests; 530 | PRODUCT_NAME = "$(TARGET_NAME)"; 531 | TARGETED_DEVICE_FAMILY = "1,2"; 532 | TEST_TARGET_NAME = YJMusicWaveView; 533 | }; 534 | name = Debug; 535 | }; 536 | 399A1B7920943FAC00B28ECC /* Release */ = { 537 | isa = XCBuildConfiguration; 538 | buildSettings = { 539 | CODE_SIGN_STYLE = Automatic; 540 | DEVELOPMENT_TEAM = 475L2MZD72; 541 | INFOPLIST_FILE = YJMusicWaveViewUITests/Info.plist; 542 | LD_RUNPATH_SEARCH_PATHS = ( 543 | "$(inherited)", 544 | "@executable_path/Frameworks", 545 | "@loader_path/Frameworks", 546 | ); 547 | PRODUCT_BUNDLE_IDENTIFIER = yangjing.YJMusicWaveViewUITests; 548 | PRODUCT_NAME = "$(TARGET_NAME)"; 549 | TARGETED_DEVICE_FAMILY = "1,2"; 550 | TEST_TARGET_NAME = YJMusicWaveView; 551 | }; 552 | name = Release; 553 | }; 554 | /* End XCBuildConfiguration section */ 555 | 556 | /* Begin XCConfigurationList section */ 557 | 399A1B4020943FAA00B28ECC /* Build configuration list for PBXProject "YJMusicWaveView" */ = { 558 | isa = XCConfigurationList; 559 | buildConfigurations = ( 560 | 399A1B6F20943FAC00B28ECC /* Debug */, 561 | 399A1B7020943FAC00B28ECC /* Release */, 562 | ); 563 | defaultConfigurationIsVisible = 0; 564 | defaultConfigurationName = Release; 565 | }; 566 | 399A1B7120943FAC00B28ECC /* Build configuration list for PBXNativeTarget "YJMusicWaveView" */ = { 567 | isa = XCConfigurationList; 568 | buildConfigurations = ( 569 | 399A1B7220943FAC00B28ECC /* Debug */, 570 | 399A1B7320943FAC00B28ECC /* Release */, 571 | ); 572 | defaultConfigurationIsVisible = 0; 573 | defaultConfigurationName = Release; 574 | }; 575 | 399A1B7420943FAC00B28ECC /* Build configuration list for PBXNativeTarget "YJMusicWaveViewTests" */ = { 576 | isa = XCConfigurationList; 577 | buildConfigurations = ( 578 | 399A1B7520943FAC00B28ECC /* Debug */, 579 | 399A1B7620943FAC00B28ECC /* Release */, 580 | ); 581 | defaultConfigurationIsVisible = 0; 582 | defaultConfigurationName = Release; 583 | }; 584 | 399A1B7720943FAC00B28ECC /* Build configuration list for PBXNativeTarget "YJMusicWaveViewUITests" */ = { 585 | isa = XCConfigurationList; 586 | buildConfigurations = ( 587 | 399A1B7820943FAC00B28ECC /* Debug */, 588 | 399A1B7920943FAC00B28ECC /* Release */, 589 | ); 590 | defaultConfigurationIsVisible = 0; 591 | defaultConfigurationName = Release; 592 | }; 593 | /* End XCConfigurationList section */ 594 | }; 595 | rootObject = 399A1B3D20943FAA00B28ECC /* Project object */; 596 | } 597 | --------------------------------------------------------------------------------