├── .gitignore ├── Demo ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist └── ViewController.swift ├── LICENSE ├── README.md ├── SwiftyWave.podspec ├── SwiftyWave.xcodeproj ├── project.pbxproj └── xcshareddata │ └── xcschemes │ ├── Demo.xcscheme │ └── SwiftyWave.xcscheme ├── SwiftyWave ├── Classes │ └── SwiftyWaveView.swift ├── Info.plist └── SwiftyWave.h ├── SwiftyWaveTests ├── Info.plist └── SwiftyWaveTests.swift └── images └── capture.gif /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/macos 3 | 4 | ### macOS ### 5 | # General 6 | .DS_Store 7 | .AppleDouble 8 | .LSOverride 9 | 10 | # Icon must end with two \r 11 | Icon 12 | 13 | # Thumbnails 14 | ._* 15 | 16 | # Files that might appear in the root of a volume 17 | .DocumentRevisions-V100 18 | .fseventsd 19 | .Spotlight-V100 20 | .TemporaryItems 21 | .Trashes 22 | .VolumeIcon.icns 23 | .com.apple.timemachine.donotpresent 24 | 25 | # Directories potentially created on remote AFP share 26 | .AppleDB 27 | .AppleDesktop 28 | Network Trash Folder 29 | Temporary Items 30 | .apdisk 31 | 32 | ### Carthage ### 33 | # Carthage 34 | # 35 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 36 | Carthage/Checkouts 37 | 38 | Carthage/Build 39 | 40 | ### CocoaPods ### 41 | ## CocoaPods GitIgnore Template 42 | 43 | # CocoaPods - Only use to conserve bandwidth / Save time on Pushing 44 | # - Also handy if you have a large number of dependant pods 45 | # - AS PER https://guides.cocoapods.org/using/using-cocoapods.html NEVER IGNORE THE LOCK FILE 46 | Pods/ 47 | 48 | ### Xcode ### 49 | # Xcode 50 | # 51 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 52 | 53 | ## User settings 54 | xcuserdata/ 55 | 56 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 57 | *.xcscmblueprint 58 | *.xccheckout 59 | 60 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 61 | build/ 62 | DerivedData/ 63 | *.moved-aside 64 | *.pbxuser 65 | !default.pbxuser 66 | *.mode1v3 67 | !default.mode1v3 68 | *.mode2v3 69 | !default.mode2v3 70 | *.perspectivev3 71 | !default.perspectivev3 72 | 73 | ### Xcode Patch ### 74 | *.xcodeproj/* 75 | !*.xcodeproj/project.pbxproj 76 | !*.xcodeproj/xcshareddata/ 77 | !*.xcworkspace/contents.xcworkspacedata 78 | /*.gcno 79 | 80 | 81 | # End of https://www.gitignore.io/api/xcode,carthage,cocoapods -------------------------------------------------------------------------------- /Demo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Demo 4 | // 5 | // Created by Octree on 2018/9/10. 6 | // Copyright © 2018年 Octree. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // 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. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // 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. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Demo/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/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Demo/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 | -------------------------------------------------------------------------------- /Demo/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 | 34 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /Demo/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/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Demo 4 | // 5 | // Created by Octree on 2018/9/10. 6 | // Copyright © 2018年 Octree. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftyWave 11 | 12 | class ViewController: UIViewController { 13 | 14 | @IBOutlet weak var waveView: SwiftyWaveView! 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | // Do any additional setup after loading the view, typically from a nib. 19 | } 20 | 21 | @IBAction func start(_ sender: Any) { 22 | 23 | waveView.start() 24 | } 25 | 26 | @IBAction func stop(_ sender: Any) { 27 | 28 | waveView.stop() 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 2 | Version 2, December 2004 3 | 4 | Copyright (C) 2016 Octree 5 | 6 | Everyone is permitted to copy and distribute verbatim or modified 7 | copies of this license document, and changing it is allowed as long 8 | as the name is changed. 9 | 10 | DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 11 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 12 | 13 | 0. You just DO WHAT THE FUCK YOU WANT TO. 14 | 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Sound Waves View in Swift 2 | 3 | [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/SwiftyWave.svg)](https://img.shields.io/cocoapods/v/SwiftyWave.svg) 4 | [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 5 | ![Platform](https://img.shields.io/cocoapods/p/SwiftyWave.svg?style=flat) 6 | 7 | 8 | 9 | ![Capture.GIF](./images/capture.gif) 10 | 11 | ## Requirements 12 | 13 | * iOS 9.0+ 14 | * Xcode 10.0+ 15 | * Swift 4.2+ 16 | 17 | ## Installation 18 | 19 | ### CocoaPods 20 | 21 | ``` 22 | pod 'SwiftyWave', '~> 1.1.0' 23 | 24 | ``` 25 | 26 | ### Carthage 27 | 28 | ``` 29 | github "Octree/SwiftyWave" ~> 1.1.0 30 | ``` 31 | 32 | ## Usage 33 | 34 | ```swift 35 | let waveView = SwiftyWaveView(frame: CGRect(x: 0, y: 0, width: 200, height: 100)) 36 | view.addSubview(waveView) 37 | waveView.start() 38 | ``` 39 | 40 | ### Code 41 | 42 | ```swift 43 | let waveView = SwiftyWaveView(frame: CGRect(x: 0, y: 0, width: 100, height: 50)) 44 | self.view.addSubview(waveView) 45 | waveView.start() 46 | ``` 47 | 48 | ### Storyboard 49 | 50 | 51 | ## License 52 | 53 | SwiftyWave is released under the WTFPL license. (Do What the Fuck You Want to Public License) 54 | 55 | -------------------------------------------------------------------------------- /SwiftyWave.podspec: -------------------------------------------------------------------------------- 1 | 2 | Pod::Spec.new do |s| 3 | s.name = "SwiftyWave" 4 | s.version = "1.1.0" 5 | s.summary = "Sound Waves View in Swift." 6 | s.description = <<-DESC 7 | Sound Waves View in Swift, Support Storyboard 8 | DESC 9 | 10 | s.homepage = "https://github.com/octree/SwiftyWave" 11 | 12 | s.license = "SwiftyWave is released under the WTFPL license. (Do What the Fuck You Want to Public License)" 13 | # s.license = { :type => "MIT", :file => "FILE_LICENSE" } 14 | 15 | s.author = { "Octree" => "octree@octree.me" } 16 | # s.social_media_url = "http://twitter.com/" 17 | # s.platform = :ios 18 | s.platform = :ios, "9.0" 19 | s.swift_version = '4.2' 20 | # When using multiple platforms 21 | # s.ios.deployment_target = "5.0" 22 | # s.osx.deployment_target = "10.7" 23 | # s.watchos.deployment_target = "2.0" 24 | # s.tvos.deployment_target = "9.0" 25 | 26 | s.source = { :git => "https://github.com/octree/SwiftyWave.git", :tag => "#{s.version}" } 27 | 28 | s.source_files = "Classes", "SwiftyWave/**/*.swift" 29 | # s.exclude_files = "Classes/Exclude" 30 | 31 | # s.public_header_files = "SwiftyWave/**/**/*.h" 32 | # s.resource = "icon.png" 33 | # s.resources = "Resources/*.png" 34 | 35 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave" 36 | # s.framework = "SomeFramework" 37 | s.frameworks = "UIKit", "QuartzCore", "CoreGraphics" 38 | end 39 | -------------------------------------------------------------------------------- /SwiftyWave.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C2DFEA802146962D005B0260 /* SwiftyWave.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2DFEA762146962D005B0260 /* SwiftyWave.framework */; }; 11 | C2DFEA852146962D005B0260 /* SwiftyWaveTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2DFEA842146962D005B0260 /* SwiftyWaveTests.swift */; }; 12 | C2DFEA872146962D005B0260 /* SwiftyWave.h in Headers */ = {isa = PBXBuildFile; fileRef = C2DFEA792146962D005B0260 /* SwiftyWave.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | C2DFEA92214696EE005B0260 /* SwiftyWaveView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2DFEA91214696ED005B0260 /* SwiftyWaveView.swift */; }; 14 | C2DFEA9A2146972D005B0260 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2DFEA992146972D005B0260 /* AppDelegate.swift */; }; 15 | C2DFEA9C2146972D005B0260 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C2DFEA9B2146972D005B0260 /* ViewController.swift */; }; 16 | C2DFEA9F2146972D005B0260 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C2DFEA9D2146972D005B0260 /* Main.storyboard */; }; 17 | C2DFEAA12146972E005B0260 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C2DFEAA02146972E005B0260 /* Assets.xcassets */; }; 18 | C2DFEAA42146972E005B0260 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C2DFEAA22146972E005B0260 /* LaunchScreen.storyboard */; }; 19 | C2DFEAA921469809005B0260 /* SwiftyWave.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C2DFEA762146962D005B0260 /* SwiftyWave.framework */; }; 20 | C2DFEAAA21469809005B0260 /* SwiftyWave.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = C2DFEA762146962D005B0260 /* SwiftyWave.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | C2DFEA812146962D005B0260 /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = C2DFEA6D2146962D005B0260 /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = C2DFEA752146962D005B0260; 29 | remoteInfo = SwiftyWave; 30 | }; 31 | C2DFEAAB21469809005B0260 /* PBXContainerItemProxy */ = { 32 | isa = PBXContainerItemProxy; 33 | containerPortal = C2DFEA6D2146962D005B0260 /* Project object */; 34 | proxyType = 1; 35 | remoteGlobalIDString = C2DFEA752146962D005B0260; 36 | remoteInfo = SwiftyWave; 37 | }; 38 | /* End PBXContainerItemProxy section */ 39 | 40 | /* Begin PBXCopyFilesBuildPhase section */ 41 | C2DFEAAD21469809005B0260 /* Embed Frameworks */ = { 42 | isa = PBXCopyFilesBuildPhase; 43 | buildActionMask = 2147483647; 44 | dstPath = ""; 45 | dstSubfolderSpec = 10; 46 | files = ( 47 | C2DFEAAA21469809005B0260 /* SwiftyWave.framework in Embed Frameworks */, 48 | ); 49 | name = "Embed Frameworks"; 50 | runOnlyForDeploymentPostprocessing = 0; 51 | }; 52 | /* End PBXCopyFilesBuildPhase section */ 53 | 54 | /* Begin PBXFileReference section */ 55 | C2DFEA762146962D005B0260 /* SwiftyWave.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftyWave.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | C2DFEA792146962D005B0260 /* SwiftyWave.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SwiftyWave.h; sourceTree = ""; }; 57 | C2DFEA7A2146962D005B0260 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | C2DFEA7F2146962D005B0260 /* SwiftyWaveTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftyWaveTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | C2DFEA842146962D005B0260 /* SwiftyWaveTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftyWaveTests.swift; sourceTree = ""; }; 60 | C2DFEA862146962D005B0260 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 61 | C2DFEA91214696ED005B0260 /* SwiftyWaveView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftyWaveView.swift; sourceTree = ""; }; 62 | C2DFEA972146972D005B0260 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 63 | C2DFEA992146972D005B0260 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 64 | C2DFEA9B2146972D005B0260 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 65 | C2DFEA9E2146972D005B0260 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 66 | C2DFEAA02146972E005B0260 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 67 | C2DFEAA32146972E005B0260 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 68 | C2DFEAA52146972E005B0260 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 69 | /* End PBXFileReference section */ 70 | 71 | /* Begin PBXFrameworksBuildPhase section */ 72 | C2DFEA732146962D005B0260 /* Frameworks */ = { 73 | isa = PBXFrameworksBuildPhase; 74 | buildActionMask = 2147483647; 75 | files = ( 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | C2DFEA7C2146962D005B0260 /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | C2DFEA802146962D005B0260 /* SwiftyWave.framework in Frameworks */, 84 | ); 85 | runOnlyForDeploymentPostprocessing = 0; 86 | }; 87 | C2DFEA942146972D005B0260 /* Frameworks */ = { 88 | isa = PBXFrameworksBuildPhase; 89 | buildActionMask = 2147483647; 90 | files = ( 91 | C2DFEAA921469809005B0260 /* SwiftyWave.framework in Frameworks */, 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | /* End PBXFrameworksBuildPhase section */ 96 | 97 | /* Begin PBXGroup section */ 98 | C2DFEA6C2146962D005B0260 = { 99 | isa = PBXGroup; 100 | children = ( 101 | C2DFEA782146962D005B0260 /* SwiftyWave */, 102 | C2DFEA832146962D005B0260 /* SwiftyWaveTests */, 103 | C2DFEA982146972D005B0260 /* Demo */, 104 | C2DFEA772146962D005B0260 /* Products */, 105 | ); 106 | sourceTree = ""; 107 | }; 108 | C2DFEA772146962D005B0260 /* Products */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | C2DFEA762146962D005B0260 /* SwiftyWave.framework */, 112 | C2DFEA7F2146962D005B0260 /* SwiftyWaveTests.xctest */, 113 | C2DFEA972146972D005B0260 /* Demo.app */, 114 | ); 115 | name = Products; 116 | sourceTree = ""; 117 | }; 118 | C2DFEA782146962D005B0260 /* SwiftyWave */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | C2DFEA90214696E3005B0260 /* Classes */, 122 | C2DFEA792146962D005B0260 /* SwiftyWave.h */, 123 | C2DFEA7A2146962D005B0260 /* Info.plist */, 124 | ); 125 | path = SwiftyWave; 126 | sourceTree = ""; 127 | }; 128 | C2DFEA832146962D005B0260 /* SwiftyWaveTests */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | C2DFEA842146962D005B0260 /* SwiftyWaveTests.swift */, 132 | C2DFEA862146962D005B0260 /* Info.plist */, 133 | ); 134 | path = SwiftyWaveTests; 135 | sourceTree = ""; 136 | }; 137 | C2DFEA90214696E3005B0260 /* Classes */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | C2DFEA91214696ED005B0260 /* SwiftyWaveView.swift */, 141 | ); 142 | path = Classes; 143 | sourceTree = ""; 144 | }; 145 | C2DFEA982146972D005B0260 /* Demo */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | C2DFEA992146972D005B0260 /* AppDelegate.swift */, 149 | C2DFEA9B2146972D005B0260 /* ViewController.swift */, 150 | C2DFEA9D2146972D005B0260 /* Main.storyboard */, 151 | C2DFEAA02146972E005B0260 /* Assets.xcassets */, 152 | C2DFEAA22146972E005B0260 /* LaunchScreen.storyboard */, 153 | C2DFEAA52146972E005B0260 /* Info.plist */, 154 | ); 155 | path = Demo; 156 | sourceTree = ""; 157 | }; 158 | /* End PBXGroup section */ 159 | 160 | /* Begin PBXHeadersBuildPhase section */ 161 | C2DFEA712146962D005B0260 /* Headers */ = { 162 | isa = PBXHeadersBuildPhase; 163 | buildActionMask = 2147483647; 164 | files = ( 165 | C2DFEA872146962D005B0260 /* SwiftyWave.h in Headers */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXHeadersBuildPhase section */ 170 | 171 | /* Begin PBXNativeTarget section */ 172 | C2DFEA752146962D005B0260 /* SwiftyWave */ = { 173 | isa = PBXNativeTarget; 174 | buildConfigurationList = C2DFEA8A2146962D005B0260 /* Build configuration list for PBXNativeTarget "SwiftyWave" */; 175 | buildPhases = ( 176 | C2DFEA712146962D005B0260 /* Headers */, 177 | C2DFEA722146962D005B0260 /* Sources */, 178 | C2DFEA732146962D005B0260 /* Frameworks */, 179 | C2DFEA742146962D005B0260 /* Resources */, 180 | ); 181 | buildRules = ( 182 | ); 183 | dependencies = ( 184 | ); 185 | name = SwiftyWave; 186 | productName = SwiftyWave; 187 | productReference = C2DFEA762146962D005B0260 /* SwiftyWave.framework */; 188 | productType = "com.apple.product-type.framework"; 189 | }; 190 | C2DFEA7E2146962D005B0260 /* SwiftyWaveTests */ = { 191 | isa = PBXNativeTarget; 192 | buildConfigurationList = C2DFEA8D2146962D005B0260 /* Build configuration list for PBXNativeTarget "SwiftyWaveTests" */; 193 | buildPhases = ( 194 | C2DFEA7B2146962D005B0260 /* Sources */, 195 | C2DFEA7C2146962D005B0260 /* Frameworks */, 196 | C2DFEA7D2146962D005B0260 /* Resources */, 197 | ); 198 | buildRules = ( 199 | ); 200 | dependencies = ( 201 | C2DFEA822146962D005B0260 /* PBXTargetDependency */, 202 | ); 203 | name = SwiftyWaveTests; 204 | productName = SwiftyWaveTests; 205 | productReference = C2DFEA7F2146962D005B0260 /* SwiftyWaveTests.xctest */; 206 | productType = "com.apple.product-type.bundle.unit-test"; 207 | }; 208 | C2DFEA962146972D005B0260 /* Demo */ = { 209 | isa = PBXNativeTarget; 210 | buildConfigurationList = C2DFEAA62146972E005B0260 /* Build configuration list for PBXNativeTarget "Demo" */; 211 | buildPhases = ( 212 | C2DFEA932146972D005B0260 /* Sources */, 213 | C2DFEA942146972D005B0260 /* Frameworks */, 214 | C2DFEA952146972D005B0260 /* Resources */, 215 | C2DFEAAD21469809005B0260 /* Embed Frameworks */, 216 | ); 217 | buildRules = ( 218 | ); 219 | dependencies = ( 220 | C2DFEAAC21469809005B0260 /* PBXTargetDependency */, 221 | ); 222 | name = Demo; 223 | productName = Demo; 224 | productReference = C2DFEA972146972D005B0260 /* Demo.app */; 225 | productType = "com.apple.product-type.application"; 226 | }; 227 | /* End PBXNativeTarget section */ 228 | 229 | /* Begin PBXProject section */ 230 | C2DFEA6D2146962D005B0260 /* Project object */ = { 231 | isa = PBXProject; 232 | attributes = { 233 | LastSwiftUpdateCheck = 1000; 234 | LastUpgradeCheck = 1000; 235 | ORGANIZATIONNAME = Octree; 236 | TargetAttributes = { 237 | C2DFEA752146962D005B0260 = { 238 | CreatedOnToolsVersion = 10.0; 239 | LastSwiftMigration = 1000; 240 | }; 241 | C2DFEA7E2146962D005B0260 = { 242 | CreatedOnToolsVersion = 10.0; 243 | }; 244 | C2DFEA962146972D005B0260 = { 245 | CreatedOnToolsVersion = 10.0; 246 | }; 247 | }; 248 | }; 249 | buildConfigurationList = C2DFEA702146962D005B0260 /* Build configuration list for PBXProject "SwiftyWave" */; 250 | compatibilityVersion = "Xcode 9.3"; 251 | developmentRegion = en; 252 | hasScannedForEncodings = 0; 253 | knownRegions = ( 254 | en, 255 | Base, 256 | ); 257 | mainGroup = C2DFEA6C2146962D005B0260; 258 | productRefGroup = C2DFEA772146962D005B0260 /* Products */; 259 | projectDirPath = ""; 260 | projectRoot = ""; 261 | targets = ( 262 | C2DFEA752146962D005B0260 /* SwiftyWave */, 263 | C2DFEA7E2146962D005B0260 /* SwiftyWaveTests */, 264 | C2DFEA962146972D005B0260 /* Demo */, 265 | ); 266 | }; 267 | /* End PBXProject section */ 268 | 269 | /* Begin PBXResourcesBuildPhase section */ 270 | C2DFEA742146962D005B0260 /* Resources */ = { 271 | isa = PBXResourcesBuildPhase; 272 | buildActionMask = 2147483647; 273 | files = ( 274 | ); 275 | runOnlyForDeploymentPostprocessing = 0; 276 | }; 277 | C2DFEA7D2146962D005B0260 /* Resources */ = { 278 | isa = PBXResourcesBuildPhase; 279 | buildActionMask = 2147483647; 280 | files = ( 281 | ); 282 | runOnlyForDeploymentPostprocessing = 0; 283 | }; 284 | C2DFEA952146972D005B0260 /* Resources */ = { 285 | isa = PBXResourcesBuildPhase; 286 | buildActionMask = 2147483647; 287 | files = ( 288 | C2DFEAA42146972E005B0260 /* LaunchScreen.storyboard in Resources */, 289 | C2DFEAA12146972E005B0260 /* Assets.xcassets in Resources */, 290 | C2DFEA9F2146972D005B0260 /* Main.storyboard in Resources */, 291 | ); 292 | runOnlyForDeploymentPostprocessing = 0; 293 | }; 294 | /* End PBXResourcesBuildPhase section */ 295 | 296 | /* Begin PBXSourcesBuildPhase section */ 297 | C2DFEA722146962D005B0260 /* Sources */ = { 298 | isa = PBXSourcesBuildPhase; 299 | buildActionMask = 2147483647; 300 | files = ( 301 | C2DFEA92214696EE005B0260 /* SwiftyWaveView.swift in Sources */, 302 | ); 303 | runOnlyForDeploymentPostprocessing = 0; 304 | }; 305 | C2DFEA7B2146962D005B0260 /* Sources */ = { 306 | isa = PBXSourcesBuildPhase; 307 | buildActionMask = 2147483647; 308 | files = ( 309 | C2DFEA852146962D005B0260 /* SwiftyWaveTests.swift in Sources */, 310 | ); 311 | runOnlyForDeploymentPostprocessing = 0; 312 | }; 313 | C2DFEA932146972D005B0260 /* Sources */ = { 314 | isa = PBXSourcesBuildPhase; 315 | buildActionMask = 2147483647; 316 | files = ( 317 | C2DFEA9C2146972D005B0260 /* ViewController.swift in Sources */, 318 | C2DFEA9A2146972D005B0260 /* AppDelegate.swift in Sources */, 319 | ); 320 | runOnlyForDeploymentPostprocessing = 0; 321 | }; 322 | /* End PBXSourcesBuildPhase section */ 323 | 324 | /* Begin PBXTargetDependency section */ 325 | C2DFEA822146962D005B0260 /* PBXTargetDependency */ = { 326 | isa = PBXTargetDependency; 327 | target = C2DFEA752146962D005B0260 /* SwiftyWave */; 328 | targetProxy = C2DFEA812146962D005B0260 /* PBXContainerItemProxy */; 329 | }; 330 | C2DFEAAC21469809005B0260 /* PBXTargetDependency */ = { 331 | isa = PBXTargetDependency; 332 | target = C2DFEA752146962D005B0260 /* SwiftyWave */; 333 | targetProxy = C2DFEAAB21469809005B0260 /* PBXContainerItemProxy */; 334 | }; 335 | /* End PBXTargetDependency section */ 336 | 337 | /* Begin PBXVariantGroup section */ 338 | C2DFEA9D2146972D005B0260 /* Main.storyboard */ = { 339 | isa = PBXVariantGroup; 340 | children = ( 341 | C2DFEA9E2146972D005B0260 /* Base */, 342 | ); 343 | name = Main.storyboard; 344 | sourceTree = ""; 345 | }; 346 | C2DFEAA22146972E005B0260 /* LaunchScreen.storyboard */ = { 347 | isa = PBXVariantGroup; 348 | children = ( 349 | C2DFEAA32146972E005B0260 /* Base */, 350 | ); 351 | name = LaunchScreen.storyboard; 352 | sourceTree = ""; 353 | }; 354 | /* End PBXVariantGroup section */ 355 | 356 | /* Begin XCBuildConfiguration section */ 357 | C2DFEA882146962D005B0260 /* Debug */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | ALWAYS_SEARCH_USER_PATHS = NO; 361 | CLANG_ANALYZER_NONNULL = YES; 362 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 363 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 364 | CLANG_CXX_LIBRARY = "libc++"; 365 | CLANG_ENABLE_MODULES = YES; 366 | CLANG_ENABLE_OBJC_ARC = YES; 367 | CLANG_ENABLE_OBJC_WEAK = YES; 368 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 369 | CLANG_WARN_BOOL_CONVERSION = YES; 370 | CLANG_WARN_COMMA = YES; 371 | CLANG_WARN_CONSTANT_CONVERSION = YES; 372 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 373 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 374 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 375 | CLANG_WARN_EMPTY_BODY = YES; 376 | CLANG_WARN_ENUM_CONVERSION = YES; 377 | CLANG_WARN_INFINITE_RECURSION = YES; 378 | CLANG_WARN_INT_CONVERSION = YES; 379 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 380 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 381 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 382 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 383 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 384 | CLANG_WARN_STRICT_PROTOTYPES = YES; 385 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 386 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 387 | CLANG_WARN_UNREACHABLE_CODE = YES; 388 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 389 | CODE_SIGN_IDENTITY = "iPhone Developer"; 390 | COPY_PHASE_STRIP = NO; 391 | CURRENT_PROJECT_VERSION = 1; 392 | DEBUG_INFORMATION_FORMAT = dwarf; 393 | ENABLE_STRICT_OBJC_MSGSEND = YES; 394 | ENABLE_TESTABILITY = YES; 395 | GCC_C_LANGUAGE_STANDARD = gnu11; 396 | GCC_DYNAMIC_NO_PIC = NO; 397 | GCC_NO_COMMON_BLOCKS = YES; 398 | GCC_OPTIMIZATION_LEVEL = 0; 399 | GCC_PREPROCESSOR_DEFINITIONS = ( 400 | "DEBUG=1", 401 | "$(inherited)", 402 | ); 403 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 404 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 405 | GCC_WARN_UNDECLARED_SELECTOR = YES; 406 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 407 | GCC_WARN_UNUSED_FUNCTION = YES; 408 | GCC_WARN_UNUSED_VARIABLE = YES; 409 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 410 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 411 | MTL_FAST_MATH = YES; 412 | ONLY_ACTIVE_ARCH = YES; 413 | SDKROOT = iphoneos; 414 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 415 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 416 | VERSIONING_SYSTEM = "apple-generic"; 417 | VERSION_INFO_PREFIX = ""; 418 | }; 419 | name = Debug; 420 | }; 421 | C2DFEA892146962D005B0260 /* Release */ = { 422 | isa = XCBuildConfiguration; 423 | buildSettings = { 424 | ALWAYS_SEARCH_USER_PATHS = NO; 425 | CLANG_ANALYZER_NONNULL = YES; 426 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 427 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 428 | CLANG_CXX_LIBRARY = "libc++"; 429 | CLANG_ENABLE_MODULES = YES; 430 | CLANG_ENABLE_OBJC_ARC = YES; 431 | CLANG_ENABLE_OBJC_WEAK = YES; 432 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 433 | CLANG_WARN_BOOL_CONVERSION = YES; 434 | CLANG_WARN_COMMA = YES; 435 | CLANG_WARN_CONSTANT_CONVERSION = YES; 436 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 437 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 438 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 439 | CLANG_WARN_EMPTY_BODY = YES; 440 | CLANG_WARN_ENUM_CONVERSION = YES; 441 | CLANG_WARN_INFINITE_RECURSION = YES; 442 | CLANG_WARN_INT_CONVERSION = YES; 443 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 444 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 445 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 446 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 447 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 448 | CLANG_WARN_STRICT_PROTOTYPES = YES; 449 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 450 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 451 | CLANG_WARN_UNREACHABLE_CODE = YES; 452 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 453 | CODE_SIGN_IDENTITY = "iPhone Developer"; 454 | COPY_PHASE_STRIP = NO; 455 | CURRENT_PROJECT_VERSION = 1; 456 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 457 | ENABLE_NS_ASSERTIONS = NO; 458 | ENABLE_STRICT_OBJC_MSGSEND = YES; 459 | GCC_C_LANGUAGE_STANDARD = gnu11; 460 | GCC_NO_COMMON_BLOCKS = YES; 461 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 462 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 463 | GCC_WARN_UNDECLARED_SELECTOR = YES; 464 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 465 | GCC_WARN_UNUSED_FUNCTION = YES; 466 | GCC_WARN_UNUSED_VARIABLE = YES; 467 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 468 | MTL_ENABLE_DEBUG_INFO = NO; 469 | MTL_FAST_MATH = YES; 470 | SDKROOT = iphoneos; 471 | SWIFT_COMPILATION_MODE = wholemodule; 472 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 473 | VALIDATE_PRODUCT = YES; 474 | VERSIONING_SYSTEM = "apple-generic"; 475 | VERSION_INFO_PREFIX = ""; 476 | }; 477 | name = Release; 478 | }; 479 | C2DFEA8B2146962D005B0260 /* Debug */ = { 480 | isa = XCBuildConfiguration; 481 | buildSettings = { 482 | CLANG_ENABLE_MODULES = YES; 483 | CODE_SIGN_IDENTITY = ""; 484 | CODE_SIGN_STYLE = Automatic; 485 | DEFINES_MODULE = YES; 486 | DEVELOPMENT_TEAM = 7A5GV3DH33; 487 | DYLIB_COMPATIBILITY_VERSION = 1; 488 | DYLIB_CURRENT_VERSION = 1; 489 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 490 | INFOPLIST_FILE = SwiftyWave/Info.plist; 491 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 492 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 493 | LD_RUNPATH_SEARCH_PATHS = ( 494 | "$(inherited)", 495 | "@executable_path/Frameworks", 496 | "@loader_path/Frameworks", 497 | ); 498 | PRODUCT_BUNDLE_IDENTIFIER = me.octree.SwiftyWave; 499 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 500 | SKIP_INSTALL = YES; 501 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 502 | SWIFT_VERSION = 4.2; 503 | TARGETED_DEVICE_FAMILY = "1,2"; 504 | }; 505 | name = Debug; 506 | }; 507 | C2DFEA8C2146962D005B0260 /* Release */ = { 508 | isa = XCBuildConfiguration; 509 | buildSettings = { 510 | CLANG_ENABLE_MODULES = YES; 511 | CODE_SIGN_IDENTITY = ""; 512 | CODE_SIGN_STYLE = Automatic; 513 | DEFINES_MODULE = YES; 514 | DEVELOPMENT_TEAM = 7A5GV3DH33; 515 | DYLIB_COMPATIBILITY_VERSION = 1; 516 | DYLIB_CURRENT_VERSION = 1; 517 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 518 | INFOPLIST_FILE = SwiftyWave/Info.plist; 519 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 520 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 521 | LD_RUNPATH_SEARCH_PATHS = ( 522 | "$(inherited)", 523 | "@executable_path/Frameworks", 524 | "@loader_path/Frameworks", 525 | ); 526 | PRODUCT_BUNDLE_IDENTIFIER = me.octree.SwiftyWave; 527 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 528 | SKIP_INSTALL = YES; 529 | SWIFT_VERSION = 4.2; 530 | TARGETED_DEVICE_FAMILY = "1,2"; 531 | }; 532 | name = Release; 533 | }; 534 | C2DFEA8E2146962D005B0260 /* Debug */ = { 535 | isa = XCBuildConfiguration; 536 | buildSettings = { 537 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 538 | CODE_SIGN_STYLE = Automatic; 539 | DEVELOPMENT_TEAM = 7A5GV3DH33; 540 | INFOPLIST_FILE = SwiftyWaveTests/Info.plist; 541 | LD_RUNPATH_SEARCH_PATHS = ( 542 | "$(inherited)", 543 | "@executable_path/Frameworks", 544 | "@loader_path/Frameworks", 545 | ); 546 | PRODUCT_BUNDLE_IDENTIFIER = me.octree.SwiftyWaveTests; 547 | PRODUCT_NAME = "$(TARGET_NAME)"; 548 | SWIFT_VERSION = 4.2; 549 | TARGETED_DEVICE_FAMILY = "1,2"; 550 | }; 551 | name = Debug; 552 | }; 553 | C2DFEA8F2146962D005B0260 /* Release */ = { 554 | isa = XCBuildConfiguration; 555 | buildSettings = { 556 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 557 | CODE_SIGN_STYLE = Automatic; 558 | DEVELOPMENT_TEAM = 7A5GV3DH33; 559 | INFOPLIST_FILE = SwiftyWaveTests/Info.plist; 560 | LD_RUNPATH_SEARCH_PATHS = ( 561 | "$(inherited)", 562 | "@executable_path/Frameworks", 563 | "@loader_path/Frameworks", 564 | ); 565 | PRODUCT_BUNDLE_IDENTIFIER = me.octree.SwiftyWaveTests; 566 | PRODUCT_NAME = "$(TARGET_NAME)"; 567 | SWIFT_VERSION = 4.2; 568 | TARGETED_DEVICE_FAMILY = "1,2"; 569 | }; 570 | name = Release; 571 | }; 572 | C2DFEAA72146972E005B0260 /* Debug */ = { 573 | isa = XCBuildConfiguration; 574 | buildSettings = { 575 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 576 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 577 | CODE_SIGN_STYLE = Automatic; 578 | DEVELOPMENT_TEAM = 7A5GV3DH33; 579 | INFOPLIST_FILE = Demo/Info.plist; 580 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 581 | LD_RUNPATH_SEARCH_PATHS = ( 582 | "$(inherited)", 583 | "@executable_path/Frameworks", 584 | ); 585 | PRODUCT_BUNDLE_IDENTIFIER = me.octree.wave.Demo; 586 | PRODUCT_NAME = "$(TARGET_NAME)"; 587 | SWIFT_VERSION = 4.2; 588 | TARGETED_DEVICE_FAMILY = "1,2"; 589 | }; 590 | name = Debug; 591 | }; 592 | C2DFEAA82146972E005B0260 /* Release */ = { 593 | isa = XCBuildConfiguration; 594 | buildSettings = { 595 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 596 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 597 | CODE_SIGN_STYLE = Automatic; 598 | DEVELOPMENT_TEAM = 7A5GV3DH33; 599 | INFOPLIST_FILE = Demo/Info.plist; 600 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 601 | LD_RUNPATH_SEARCH_PATHS = ( 602 | "$(inherited)", 603 | "@executable_path/Frameworks", 604 | ); 605 | PRODUCT_BUNDLE_IDENTIFIER = me.octree.wave.Demo; 606 | PRODUCT_NAME = "$(TARGET_NAME)"; 607 | SWIFT_VERSION = 4.2; 608 | TARGETED_DEVICE_FAMILY = "1,2"; 609 | }; 610 | name = Release; 611 | }; 612 | /* End XCBuildConfiguration section */ 613 | 614 | /* Begin XCConfigurationList section */ 615 | C2DFEA702146962D005B0260 /* Build configuration list for PBXProject "SwiftyWave" */ = { 616 | isa = XCConfigurationList; 617 | buildConfigurations = ( 618 | C2DFEA882146962D005B0260 /* Debug */, 619 | C2DFEA892146962D005B0260 /* Release */, 620 | ); 621 | defaultConfigurationIsVisible = 0; 622 | defaultConfigurationName = Release; 623 | }; 624 | C2DFEA8A2146962D005B0260 /* Build configuration list for PBXNativeTarget "SwiftyWave" */ = { 625 | isa = XCConfigurationList; 626 | buildConfigurations = ( 627 | C2DFEA8B2146962D005B0260 /* Debug */, 628 | C2DFEA8C2146962D005B0260 /* Release */, 629 | ); 630 | defaultConfigurationIsVisible = 0; 631 | defaultConfigurationName = Release; 632 | }; 633 | C2DFEA8D2146962D005B0260 /* Build configuration list for PBXNativeTarget "SwiftyWaveTests" */ = { 634 | isa = XCConfigurationList; 635 | buildConfigurations = ( 636 | C2DFEA8E2146962D005B0260 /* Debug */, 637 | C2DFEA8F2146962D005B0260 /* Release */, 638 | ); 639 | defaultConfigurationIsVisible = 0; 640 | defaultConfigurationName = Release; 641 | }; 642 | C2DFEAA62146972E005B0260 /* Build configuration list for PBXNativeTarget "Demo" */ = { 643 | isa = XCConfigurationList; 644 | buildConfigurations = ( 645 | C2DFEAA72146972E005B0260 /* Debug */, 646 | C2DFEAA82146972E005B0260 /* Release */, 647 | ); 648 | defaultConfigurationIsVisible = 0; 649 | defaultConfigurationName = Release; 650 | }; 651 | /* End XCConfigurationList section */ 652 | }; 653 | rootObject = C2DFEA6D2146962D005B0260 /* Project object */; 654 | } 655 | -------------------------------------------------------------------------------- /SwiftyWave.xcodeproj/xcshareddata/xcschemes/Demo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /SwiftyWave.xcodeproj/xcshareddata/xcschemes/SwiftyWave.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /SwiftyWave/Classes/SwiftyWaveView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftyWaveView.swift 3 | // SwiftyWave 4 | // 5 | // Created by Octree on 2016/10/24. 6 | // Copyright © 2016年 Octree. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import QuartzCore 11 | 12 | fileprivate func gfn(x: CGFloat) -> CGFloat { 13 | 14 | return pow((8 / (8 + pow(x, 4))), 8) 15 | } 16 | 17 | fileprivate func line(att: CGFloat, a: Int, b: CGFloat) -> (CGFloat) -> CGFloat { 18 | 19 | return {x in 20 | 21 | return gfn(x: x) * sin(CGFloat(a) * x - b) / att 22 | } 23 | } 24 | 25 | fileprivate struct Wave { 26 | 27 | var attenuation: CGFloat 28 | var lineWidth: CGFloat 29 | var opacity: CGFloat 30 | 31 | init(att: CGFloat, lineWidth: CGFloat, opacity: CGFloat) { 32 | 33 | self.attenuation = att 34 | self.lineWidth = lineWidth 35 | self.opacity = opacity 36 | } 37 | } 38 | 39 | @IBDesignable 40 | open class SwiftyWaveView: UIView { 41 | 42 | fileprivate var phase: CGFloat = 0.0 43 | fileprivate var displayLink: CADisplayLink? 44 | fileprivate var animatingStart = false 45 | fileprivate var animatingStop = false 46 | fileprivate var currentAmplitude: CGFloat = 0.0 47 | 48 | @IBInspectable 49 | public var speed: CGFloat = 0.1 50 | @IBInspectable 51 | public var amplitude: CGFloat = 0.5 52 | @IBInspectable 53 | public var frequency: Int = 6 54 | @IBInspectable 55 | public var color: UIColor = .white 56 | public private(set) var animating = false 57 | 58 | 59 | fileprivate let waves = [Wave(att: 1, lineWidth: 1.5, opacity: 1.0), 60 | Wave(att: 2, lineWidth: 1.0, opacity: 0.6), 61 | Wave(att: 4, lineWidth: 1.0, opacity: 0.4), 62 | Wave(att: -6, lineWidth: 1.0, opacity: 0.2), 63 | Wave(att: -2, lineWidth: 1.0, opacity: 0.1) 64 | ] 65 | fileprivate let shapeLayers = [CAShapeLayer(), 66 | CAShapeLayer(), 67 | CAShapeLayer(), 68 | CAShapeLayer(), 69 | CAShapeLayer()] 70 | 71 | // MARK: Life Cycle 72 | 73 | public override init(frame: CGRect) { 74 | 75 | super.init(frame: frame) 76 | shapeLayers.forEach(layer.addSublayer) 77 | } 78 | 79 | public required init?(coder aDecoder: NSCoder) { 80 | 81 | super.init(coder: aDecoder) 82 | shapeLayers.forEach(layer.addSublayer) 83 | } 84 | 85 | override open func layoutSubviews() { 86 | super.layoutSubviews() 87 | drawLayers() 88 | } 89 | 90 | // MARK: Public Methods 91 | 92 | public func start() { 93 | 94 | if (animating) { 95 | 96 | return 97 | } 98 | 99 | invalidate() 100 | animating = true 101 | animatingStop = false 102 | animatingStart = true 103 | displayLink = CADisplayLink(target: self, selector: #selector(SwiftyWaveView.drawWaves)) 104 | displayLink!.frameInterval = 1 105 | displayLink!.add(to: RunLoop.main, forMode: RunLoop.Mode.common) 106 | } 107 | 108 | public func stop() { 109 | 110 | animating = false 111 | animatingStart = false 112 | animatingStop = true 113 | } 114 | 115 | 116 | // MARK: Private Methods 117 | 118 | private func invalidate() { 119 | 120 | displayLink?.isPaused = true 121 | displayLink?.remove(from: RunLoop.main, forMode: RunLoop.Mode.common) 122 | displayLink = nil 123 | } 124 | 125 | // 126 | @objc private func drawWaves() { 127 | 128 | phase = (phase + CGFloat.pi * speed) 129 | .truncatingRemainder(dividingBy: 2 * CGFloat.pi) 130 | 131 | if (animatingStart) { 132 | 133 | currentAmplitude = currentAmplitude + 0.02 134 | if (currentAmplitude >= amplitude) { 135 | 136 | currentAmplitude = amplitude 137 | animatingStart = false 138 | } 139 | } else if (animatingStop) { 140 | 141 | currentAmplitude = currentAmplitude - 0.02 142 | if (currentAmplitude <= 0.001) { 143 | 144 | currentAmplitude = 0 145 | animatingStop = false 146 | invalidate() 147 | } 148 | } 149 | 150 | let count = waves.count 151 | 152 | for i in 0 ..< count { 153 | 154 | let shapLayer = shapeLayers[i] 155 | let wave = waves[i] 156 | shapLayer.path = bezierPath(for: wave).cgPath 157 | } 158 | 159 | } 160 | 161 | 162 | private func drawLayers() { 163 | 164 | let count = waves.count 165 | 166 | for i in 0 ..< count { 167 | 168 | let shapLayer = shapeLayers[i] 169 | let wave = waves[i] 170 | shapLayer.fillColor = UIColor.clear.cgColor 171 | shapLayer.lineWidth = wave.lineWidth 172 | shapLayer.strokeColor = color.withAlphaComponent(wave.opacity).cgColor 173 | shapLayer.path = bezierPath(for: wave).cgPath 174 | } 175 | } 176 | 177 | 178 | private func bezierPath(for wave: Wave) -> UIBezierPath { 179 | 180 | let path = UIBezierPath() 181 | 182 | let width = frame.width 183 | let height = frame.height 184 | let centerY = height / 2 185 | let scale = width / 4 186 | let centerX = width / 2 187 | let f = line(att: wave.attenuation, a: frequency, b: phase) 188 | path.move(to: CGPoint(x: 0, y: centerY)) 189 | for i in 0...Int(width) { 190 | 191 | let x = (CGFloat(i) - centerX) / scale 192 | let y = f(x) * scale * currentAmplitude + centerY 193 | path.addLine(to: CGPoint(x: CGFloat(i), y: y)) 194 | } 195 | 196 | return path 197 | } 198 | } 199 | -------------------------------------------------------------------------------- /SwiftyWave/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /SwiftyWave/SwiftyWave.h: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftyWave.h 3 | // SwiftyWave 4 | // 5 | // Created by Octree on 2018/9/10. 6 | // Copyright © 2018年 Octree. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for SwiftyWave. 12 | FOUNDATION_EXPORT double SwiftyWaveVersionNumber; 13 | 14 | //! Project version string for SwiftyWave. 15 | FOUNDATION_EXPORT const unsigned char SwiftyWaveVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /SwiftyWaveTests/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 | -------------------------------------------------------------------------------- /SwiftyWaveTests/SwiftyWaveTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftyWaveTests.swift 3 | // SwiftyWaveTests 4 | // 5 | // Created by Octree on 2018/9/10. 6 | // Copyright © 2018年 Octree. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import SwiftyWave 11 | 12 | class SwiftyWaveTests: XCTestCase { 13 | 14 | override func setUp() { 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | } 21 | 22 | func testExample() { 23 | // This is an example of a functional test case. 24 | // Use XCTAssert and related functions to verify your tests produce the correct results. 25 | } 26 | 27 | func testPerformanceExample() { 28 | // This is an example of a performance test case. 29 | self.measure { 30 | // Put the code you want to measure the time of here. 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /images/capture.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/octree/SwiftyWave/819ef8c6822aba7a74c591df91c8b0e2470ef91e/images/capture.gif --------------------------------------------------------------------------------