├── .gitignore ├── Demo ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ └── LaunchScreen.storyboard ├── Info.plist └── ViewController.swift ├── DemoTests ├── DemoTests.swift └── Info.plist ├── DemoUITests ├── DemoUITests.swift └── Info.plist ├── LICENSE ├── README.md ├── Resources └── Screen-Recording-2020-04-24-at-22.05.11.gif ├── UIWaveView.podspec ├── UIWaveView.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── UIWaveView ├── Info.plist ├── Source │ └── UIWaveView.swift └── UIWaveView.h └── UIWaveViewTests ├── Info.plist └── UIWaveViewTests.swift /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## User settings 6 | xcuserdata/ 7 | 8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 9 | *.xcscmblueprint 10 | *.xccheckout 11 | 12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 13 | build/ 14 | DerivedData/ 15 | *.moved-aside 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | 28 | ## App packaging 29 | *.ipa 30 | *.dSYM.zip 31 | *.dSYM 32 | 33 | ## Playgrounds 34 | timeline.xctimeline 35 | playground.xcworkspace 36 | 37 | # Swift Package Manager 38 | # 39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 40 | # Packages/ 41 | # Package.pins 42 | # Package.resolved 43 | # *.xcodeproj 44 | # 45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 46 | # hence it is not needed unless you have added a package configuration file to your project 47 | # .swiftpm 48 | 49 | .build/ 50 | 51 | # CocoaPods 52 | # 53 | # We recommend against adding the Pods directory to your .gitignore. However 54 | # you should judge for yourself, the pros and cons are mentioned at: 55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 56 | # 57 | # Pods/ 58 | # 59 | # Add this line if you want to avoid checking in source code from the Xcode workspace 60 | # *.xcworkspace 61 | 62 | # Carthage 63 | # 64 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 65 | # Carthage/Checkouts 66 | 67 | Carthage/Build/ 68 | 69 | # Accio dependency management 70 | Dependencies/ 71 | .accio/ 72 | 73 | # fastlane 74 | # 75 | # It is recommended to not store the screenshots in the git repo. 76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 77 | # For more information about the recommended setup visit: 78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 79 | 80 | fastlane/report.xml 81 | fastlane/Preview.html 82 | fastlane/screenshots/**/*.png 83 | fastlane/test_output 84 | 85 | # Code Injection 86 | # 87 | # After new code Injection tools there's a generated folder /iOSInjectionProject 88 | # https://github.com/johnno1962/injectionforxcode 89 | 90 | iOSInjectionProject/ 91 | -------------------------------------------------------------------------------- /Demo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Demo 4 | // 5 | // Created by Cao Phuoc Thanh on 4/24/20. 6 | // Copyright © 2020 Cao Phuoc Thanh. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | 18 | let window = UIWindow(frame: UIScreen.main.bounds) 19 | self.window?.backgroundColor = UIColor.white 20 | self.window = window 21 | let vc = ViewController() 22 | self.window?.rootViewController = vc 23 | self.window?.makeKeyAndVisible() 24 | 25 | return true 26 | } 27 | 28 | } 29 | 30 | -------------------------------------------------------------------------------- /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/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 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIRequiredDeviceCapabilities 26 | 27 | armv7 28 | 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Demo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Demo 4 | // 5 | // Created by Cao Phuoc Thanh on 4/24/20. 6 | // Copyright © 2020 Cao Phuoc Thanh. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import UIWaveView 11 | 12 | // MARK: Controller 13 | class ViewController: UIViewController { 14 | 15 | fileprivate var waterView: UIWaveView = UIWaveView() 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | // Start wave 20 | waterView.start() 21 | timerUpdateProgress() 22 | } 23 | 24 | private func timerUpdateProgress() { 25 | var p: Float = 100 26 | self.waterView.progress = p 27 | 28 | Timer.scheduledTimer(withTimeInterval: 0.05, repeats: true) { (timer) in 29 | p += 0.5 30 | self.waterView.progress = p 31 | if p >= 100 { 32 | p = 0 33 | } 34 | } 35 | } 36 | } 37 | 38 | // MARK: View 39 | extension ViewController { 40 | 41 | override func loadView() { 42 | super.loadView() 43 | 44 | self.view.backgroundColor = .white 45 | 46 | waterView.layer.cornerRadius = 100 47 | waterView.layer.masksToBounds = true 48 | waterView.translatesAutoresizingMaskIntoConstraints = false 49 | 50 | // Add WaveView 51 | self.view.addSubview(waterView) 52 | 53 | // set visual 54 | let constraintH = NSLayoutConstraint.constraints( 55 | withVisualFormat: "H:[v(200)]", 56 | options: [], 57 | metrics: nil, 58 | views: ["v": waterView]) 59 | 60 | let constraintV = NSLayoutConstraint.constraints( 61 | withVisualFormat: "V:[v(200)]", 62 | options: [], 63 | metrics: nil, 64 | views: ["v": waterView]) 65 | 66 | let constraintCenterYs = [NSLayoutConstraint( 67 | item: waterView, 68 | attribute: .centerY, relatedBy: .equal, 69 | toItem: view, attribute: .centerY, 70 | multiplier: 1.0, constant: 0.0)] 71 | 72 | let constraintCenterXs = [NSLayoutConstraint( 73 | item: waterView, 74 | attribute: .centerX, relatedBy: .equal, 75 | toItem: view, attribute: .centerX, 76 | multiplier: 1.0, constant: 0.0)] 77 | 78 | self.view.addConstraints(constraintCenterXs) 79 | self.view.addConstraints(constraintCenterYs) 80 | self.view.addConstraints(constraintH) 81 | self.view.addConstraints(constraintV) 82 | } 83 | } 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /DemoTests/DemoTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DemoTests.swift 3 | // DemoTests 4 | // 5 | // Created by Cao Phuoc Thanh on 4/24/20. 6 | // Copyright © 2020 Cao Phuoc Thanh. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import Demo 11 | 12 | class DemoTests: 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 | -------------------------------------------------------------------------------- /DemoTests/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 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /DemoUITests/DemoUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DemoUITests.swift 3 | // DemoUITests 4 | // 5 | // Created by Cao Phuoc Thanh on 4/24/20. 6 | // Copyright © 2020 Cao Phuoc Thanh. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class DemoUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | // Put setup code here. This method is called before the invocation of each test method in the class. 15 | 16 | // In UI tests it is usually best to stop immediately when a failure occurs. 17 | continueAfterFailure = false 18 | 19 | // 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. 20 | } 21 | 22 | override func tearDown() { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | } 25 | 26 | func testExample() { 27 | // UI tests must launch the application that they test. 28 | let app = XCUIApplication() 29 | app.launch() 30 | 31 | // Use recording to get started writing UI tests. 32 | // Use XCTAssert and related functions to verify your tests produce the correct results. 33 | } 34 | 35 | func testLaunchPerformance() { 36 | if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { 37 | // This measures how long it takes to launch your application. 38 | measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) { 39 | XCUIApplication().launch() 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /DemoUITests/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 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 onebuffer.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UIWaveView 2 | 3 | Wave view for battery view 4 | I use this view for process of battery in iPhone and battery of device connected with iphone. 5 | 6 | ## Demo 7 | 8 | 9 | ## Installation 10 | 11 | ### Manual 12 | Copy file WaveAnimation.swift to your project and change proterties as your expect. 13 | 14 | ### CocoaPods 15 | CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate Alamofire into your Xcode project using CocoaPods, specify it in your Podfile: 16 | 17 | ```swift 18 | pod 'UIWaveView' 19 | ``` 20 | 21 | ## Contact 22 | - Email: caophuocthanh@gmail.com 23 | - Site: https://onebuffer.com 24 | - Linkedin: https://www.linkedin.com/in/caophuocthanh/ 25 | -------------------------------------------------------------------------------- /Resources/Screen-Recording-2020-04-24-at-22.05.11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bionelabs/UIWaveView/62474554c6a3f70906f0f9032a102097a497dfb0/Resources/Screen-Recording-2020-04-24-at-22.05.11.gif -------------------------------------------------------------------------------- /UIWaveView.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |spec| 2 | 3 | spec.name = "UIWaveView" 4 | spec.version = "0.0.1" 5 | spec.summary = "A CocoaPods library written in Swift" 6 | 7 | spec.description = <<-DESC 8 | This CocoaPods library helps you perform calculation. 9 | DESC 10 | 11 | spec.homepage = "https://github.com/onebuffer/UIWaveView" 12 | spec.license = { :type => "MIT", :file => "LICENSE" } 13 | spec.author = { "Cao Phuoc Thanh" => "caophuocthanh@gmail.com" } 14 | 15 | spec.ios.deployment_target = "11.0" 16 | spec.swift_version = "4.2" 17 | 18 | spec.source = { :git => "https://github.com/onebuffer/UIWaveView.git", :tag => "#{spec.version}" } 19 | spec.source_files = "UIWaveView/**/*.{h,m,swift}" 20 | 21 | end 22 | 23 | -------------------------------------------------------------------------------- /UIWaveView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 05BC6CB12453399700553722 /* UIWaveView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 05BC6CA72453399700553722 /* UIWaveView.framework */; }; 11 | 05BC6CB62453399700553722 /* UIWaveViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05BC6CB52453399700553722 /* UIWaveViewTests.swift */; }; 12 | 05BC6CB82453399700553722 /* UIWaveView.h in Headers */ = {isa = PBXBuildFile; fileRef = 05BC6CAA2453399700553722 /* UIWaveView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 05BC6CC3245339C300553722 /* UIWaveView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05BC6CC2245339C300553722 /* UIWaveView.swift */; }; 14 | 05BC6CCB24533A0B00553722 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05BC6CCA24533A0B00553722 /* AppDelegate.swift */; }; 15 | 05BC6CCF24533A0B00553722 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05BC6CCE24533A0B00553722 /* ViewController.swift */; }; 16 | 05BC6CD424533A1000553722 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 05BC6CD324533A1000553722 /* Assets.xcassets */; }; 17 | 05BC6CD724533A1000553722 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 05BC6CD524533A1000553722 /* LaunchScreen.storyboard */; }; 18 | 05BC6CE224533A1100553722 /* DemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05BC6CE124533A1100553722 /* DemoTests.swift */; }; 19 | 05BC6CED24533A1100553722 /* DemoUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05BC6CEC24533A1100553722 /* DemoUITests.swift */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | 05BC6CB22453399700553722 /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = 05BC6C9E2453399700553722 /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = 05BC6CA62453399700553722; 28 | remoteInfo = UIWaveView; 29 | }; 30 | 05BC6CDE24533A1100553722 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 05BC6C9E2453399700553722 /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 05BC6CC724533A0B00553722; 35 | remoteInfo = Demo; 36 | }; 37 | 05BC6CE924533A1100553722 /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = 05BC6C9E2453399700553722 /* Project object */; 40 | proxyType = 1; 41 | remoteGlobalIDString = 05BC6CC724533A0B00553722; 42 | remoteInfo = Demo; 43 | }; 44 | /* End PBXContainerItemProxy section */ 45 | 46 | /* Begin PBXFileReference section */ 47 | 05BC6CA72453399700553722 /* UIWaveView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = UIWaveView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 05BC6CAA2453399700553722 /* UIWaveView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIWaveView.h; sourceTree = ""; }; 49 | 05BC6CAB2453399700553722 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | 05BC6CB02453399700553722 /* UIWaveViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = UIWaveViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 05BC6CB52453399700553722 /* UIWaveViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIWaveViewTests.swift; sourceTree = ""; }; 52 | 05BC6CB72453399700553722 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | 05BC6CC2245339C300553722 /* UIWaveView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIWaveView.swift; sourceTree = ""; }; 54 | 05BC6CC824533A0B00553722 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 05BC6CCA24533A0B00553722 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 56 | 05BC6CCE24533A0B00553722 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 57 | 05BC6CD324533A1000553722 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 58 | 05BC6CD624533A1000553722 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 59 | 05BC6CD824533A1000553722 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 60 | 05BC6CDD24533A1100553722 /* DemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 61 | 05BC6CE124533A1100553722 /* DemoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoTests.swift; sourceTree = ""; }; 62 | 05BC6CE324533A1100553722 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 63 | 05BC6CE824533A1100553722 /* DemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 64 | 05BC6CEC24533A1100553722 /* DemoUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DemoUITests.swift; sourceTree = ""; }; 65 | 05BC6CEE24533A1100553722 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 66 | /* End PBXFileReference section */ 67 | 68 | /* Begin PBXFrameworksBuildPhase section */ 69 | 05BC6CA42453399700553722 /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | 05BC6CAD2453399700553722 /* Frameworks */ = { 77 | isa = PBXFrameworksBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | 05BC6CB12453399700553722 /* UIWaveView.framework in Frameworks */, 81 | ); 82 | runOnlyForDeploymentPostprocessing = 0; 83 | }; 84 | 05BC6CC524533A0B00553722 /* Frameworks */ = { 85 | isa = PBXFrameworksBuildPhase; 86 | buildActionMask = 2147483647; 87 | files = ( 88 | ); 89 | runOnlyForDeploymentPostprocessing = 0; 90 | }; 91 | 05BC6CDA24533A1100553722 /* Frameworks */ = { 92 | isa = PBXFrameworksBuildPhase; 93 | buildActionMask = 2147483647; 94 | files = ( 95 | ); 96 | runOnlyForDeploymentPostprocessing = 0; 97 | }; 98 | 05BC6CE524533A1100553722 /* Frameworks */ = { 99 | isa = PBXFrameworksBuildPhase; 100 | buildActionMask = 2147483647; 101 | files = ( 102 | ); 103 | runOnlyForDeploymentPostprocessing = 0; 104 | }; 105 | /* End PBXFrameworksBuildPhase section */ 106 | 107 | /* Begin PBXGroup section */ 108 | 05BC6C9D2453399700553722 = { 109 | isa = PBXGroup; 110 | children = ( 111 | 05BC6CA92453399700553722 /* UIWaveView */, 112 | 05BC6CB42453399700553722 /* UIWaveViewTests */, 113 | 05BC6CC924533A0B00553722 /* Demo */, 114 | 05BC6CE024533A1100553722 /* DemoTests */, 115 | 05BC6CEB24533A1100553722 /* DemoUITests */, 116 | 05BC6CA82453399700553722 /* Products */, 117 | ); 118 | sourceTree = ""; 119 | }; 120 | 05BC6CA82453399700553722 /* Products */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 05BC6CA72453399700553722 /* UIWaveView.framework */, 124 | 05BC6CB02453399700553722 /* UIWaveViewTests.xctest */, 125 | 05BC6CC824533A0B00553722 /* Demo.app */, 126 | 05BC6CDD24533A1100553722 /* DemoTests.xctest */, 127 | 05BC6CE824533A1100553722 /* DemoUITests.xctest */, 128 | ); 129 | name = Products; 130 | sourceTree = ""; 131 | }; 132 | 05BC6CA92453399700553722 /* UIWaveView */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | 05BC6CC12453399E00553722 /* Source */, 136 | 05BC6CAA2453399700553722 /* UIWaveView.h */, 137 | 05BC6CAB2453399700553722 /* Info.plist */, 138 | ); 139 | path = UIWaveView; 140 | sourceTree = ""; 141 | }; 142 | 05BC6CB42453399700553722 /* UIWaveViewTests */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 05BC6CB52453399700553722 /* UIWaveViewTests.swift */, 146 | 05BC6CB72453399700553722 /* Info.plist */, 147 | ); 148 | path = UIWaveViewTests; 149 | sourceTree = ""; 150 | }; 151 | 05BC6CC12453399E00553722 /* Source */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | 05BC6CC2245339C300553722 /* UIWaveView.swift */, 155 | ); 156 | path = Source; 157 | sourceTree = ""; 158 | }; 159 | 05BC6CC924533A0B00553722 /* Demo */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 05BC6CCA24533A0B00553722 /* AppDelegate.swift */, 163 | 05BC6CCE24533A0B00553722 /* ViewController.swift */, 164 | 05BC6CD324533A1000553722 /* Assets.xcassets */, 165 | 05BC6CD524533A1000553722 /* LaunchScreen.storyboard */, 166 | 05BC6CD824533A1000553722 /* Info.plist */, 167 | ); 168 | path = Demo; 169 | sourceTree = ""; 170 | }; 171 | 05BC6CE024533A1100553722 /* DemoTests */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | 05BC6CE124533A1100553722 /* DemoTests.swift */, 175 | 05BC6CE324533A1100553722 /* Info.plist */, 176 | ); 177 | path = DemoTests; 178 | sourceTree = ""; 179 | }; 180 | 05BC6CEB24533A1100553722 /* DemoUITests */ = { 181 | isa = PBXGroup; 182 | children = ( 183 | 05BC6CEC24533A1100553722 /* DemoUITests.swift */, 184 | 05BC6CEE24533A1100553722 /* Info.plist */, 185 | ); 186 | path = DemoUITests; 187 | sourceTree = ""; 188 | }; 189 | /* End PBXGroup section */ 190 | 191 | /* Begin PBXHeadersBuildPhase section */ 192 | 05BC6CA22453399700553722 /* Headers */ = { 193 | isa = PBXHeadersBuildPhase; 194 | buildActionMask = 2147483647; 195 | files = ( 196 | 05BC6CB82453399700553722 /* UIWaveView.h in Headers */, 197 | ); 198 | runOnlyForDeploymentPostprocessing = 0; 199 | }; 200 | /* End PBXHeadersBuildPhase section */ 201 | 202 | /* Begin PBXNativeTarget section */ 203 | 05BC6CA62453399700553722 /* UIWaveView */ = { 204 | isa = PBXNativeTarget; 205 | buildConfigurationList = 05BC6CBB2453399700553722 /* Build configuration list for PBXNativeTarget "UIWaveView" */; 206 | buildPhases = ( 207 | 05BC6CA22453399700553722 /* Headers */, 208 | 05BC6CA32453399700553722 /* Sources */, 209 | 05BC6CA42453399700553722 /* Frameworks */, 210 | 05BC6CA52453399700553722 /* Resources */, 211 | ); 212 | buildRules = ( 213 | ); 214 | dependencies = ( 215 | ); 216 | name = UIWaveView; 217 | productName = UIWaveView; 218 | productReference = 05BC6CA72453399700553722 /* UIWaveView.framework */; 219 | productType = "com.apple.product-type.framework"; 220 | }; 221 | 05BC6CAF2453399700553722 /* UIWaveViewTests */ = { 222 | isa = PBXNativeTarget; 223 | buildConfigurationList = 05BC6CBE2453399700553722 /* Build configuration list for PBXNativeTarget "UIWaveViewTests" */; 224 | buildPhases = ( 225 | 05BC6CAC2453399700553722 /* Sources */, 226 | 05BC6CAD2453399700553722 /* Frameworks */, 227 | 05BC6CAE2453399700553722 /* Resources */, 228 | ); 229 | buildRules = ( 230 | ); 231 | dependencies = ( 232 | 05BC6CB32453399700553722 /* PBXTargetDependency */, 233 | ); 234 | name = UIWaveViewTests; 235 | productName = UIWaveViewTests; 236 | productReference = 05BC6CB02453399700553722 /* UIWaveViewTests.xctest */; 237 | productType = "com.apple.product-type.bundle.unit-test"; 238 | }; 239 | 05BC6CC724533A0B00553722 /* Demo */ = { 240 | isa = PBXNativeTarget; 241 | buildConfigurationList = 05BC6CEF24533A1100553722 /* Build configuration list for PBXNativeTarget "Demo" */; 242 | buildPhases = ( 243 | 05BC6CC424533A0B00553722 /* Sources */, 244 | 05BC6CC524533A0B00553722 /* Frameworks */, 245 | 05BC6CC624533A0B00553722 /* Resources */, 246 | ); 247 | buildRules = ( 248 | ); 249 | dependencies = ( 250 | ); 251 | name = Demo; 252 | productName = Demo; 253 | productReference = 05BC6CC824533A0B00553722 /* Demo.app */; 254 | productType = "com.apple.product-type.application"; 255 | }; 256 | 05BC6CDC24533A1100553722 /* DemoTests */ = { 257 | isa = PBXNativeTarget; 258 | buildConfigurationList = 05BC6CF224533A1100553722 /* Build configuration list for PBXNativeTarget "DemoTests" */; 259 | buildPhases = ( 260 | 05BC6CD924533A1100553722 /* Sources */, 261 | 05BC6CDA24533A1100553722 /* Frameworks */, 262 | 05BC6CDB24533A1100553722 /* Resources */, 263 | ); 264 | buildRules = ( 265 | ); 266 | dependencies = ( 267 | 05BC6CDF24533A1100553722 /* PBXTargetDependency */, 268 | ); 269 | name = DemoTests; 270 | productName = DemoTests; 271 | productReference = 05BC6CDD24533A1100553722 /* DemoTests.xctest */; 272 | productType = "com.apple.product-type.bundle.unit-test"; 273 | }; 274 | 05BC6CE724533A1100553722 /* DemoUITests */ = { 275 | isa = PBXNativeTarget; 276 | buildConfigurationList = 05BC6CF524533A1100553722 /* Build configuration list for PBXNativeTarget "DemoUITests" */; 277 | buildPhases = ( 278 | 05BC6CE424533A1100553722 /* Sources */, 279 | 05BC6CE524533A1100553722 /* Frameworks */, 280 | 05BC6CE624533A1100553722 /* Resources */, 281 | ); 282 | buildRules = ( 283 | ); 284 | dependencies = ( 285 | 05BC6CEA24533A1100553722 /* PBXTargetDependency */, 286 | ); 287 | name = DemoUITests; 288 | productName = DemoUITests; 289 | productReference = 05BC6CE824533A1100553722 /* DemoUITests.xctest */; 290 | productType = "com.apple.product-type.bundle.ui-testing"; 291 | }; 292 | /* End PBXNativeTarget section */ 293 | 294 | /* Begin PBXProject section */ 295 | 05BC6C9E2453399700553722 /* Project object */ = { 296 | isa = PBXProject; 297 | attributes = { 298 | LastSwiftUpdateCheck = 1130; 299 | LastUpgradeCheck = 1130; 300 | ORGANIZATIONNAME = "Cao Phuoc Thanh"; 301 | TargetAttributes = { 302 | 05BC6CA62453399700553722 = { 303 | CreatedOnToolsVersion = 11.3.1; 304 | LastSwiftMigration = 1130; 305 | }; 306 | 05BC6CAF2453399700553722 = { 307 | CreatedOnToolsVersion = 11.3.1; 308 | }; 309 | 05BC6CC724533A0B00553722 = { 310 | CreatedOnToolsVersion = 11.3.1; 311 | }; 312 | 05BC6CDC24533A1100553722 = { 313 | CreatedOnToolsVersion = 11.3.1; 314 | TestTargetID = 05BC6CC724533A0B00553722; 315 | }; 316 | 05BC6CE724533A1100553722 = { 317 | CreatedOnToolsVersion = 11.3.1; 318 | TestTargetID = 05BC6CC724533A0B00553722; 319 | }; 320 | }; 321 | }; 322 | buildConfigurationList = 05BC6CA12453399700553722 /* Build configuration list for PBXProject "UIWaveView" */; 323 | compatibilityVersion = "Xcode 9.3"; 324 | developmentRegion = en; 325 | hasScannedForEncodings = 0; 326 | knownRegions = ( 327 | en, 328 | Base, 329 | ); 330 | mainGroup = 05BC6C9D2453399700553722; 331 | productRefGroup = 05BC6CA82453399700553722 /* Products */; 332 | projectDirPath = ""; 333 | projectRoot = ""; 334 | targets = ( 335 | 05BC6CA62453399700553722 /* UIWaveView */, 336 | 05BC6CAF2453399700553722 /* UIWaveViewTests */, 337 | 05BC6CC724533A0B00553722 /* Demo */, 338 | 05BC6CDC24533A1100553722 /* DemoTests */, 339 | 05BC6CE724533A1100553722 /* DemoUITests */, 340 | ); 341 | }; 342 | /* End PBXProject section */ 343 | 344 | /* Begin PBXResourcesBuildPhase section */ 345 | 05BC6CA52453399700553722 /* Resources */ = { 346 | isa = PBXResourcesBuildPhase; 347 | buildActionMask = 2147483647; 348 | files = ( 349 | ); 350 | runOnlyForDeploymentPostprocessing = 0; 351 | }; 352 | 05BC6CAE2453399700553722 /* Resources */ = { 353 | isa = PBXResourcesBuildPhase; 354 | buildActionMask = 2147483647; 355 | files = ( 356 | ); 357 | runOnlyForDeploymentPostprocessing = 0; 358 | }; 359 | 05BC6CC624533A0B00553722 /* Resources */ = { 360 | isa = PBXResourcesBuildPhase; 361 | buildActionMask = 2147483647; 362 | files = ( 363 | 05BC6CD724533A1000553722 /* LaunchScreen.storyboard in Resources */, 364 | 05BC6CD424533A1000553722 /* Assets.xcassets in Resources */, 365 | ); 366 | runOnlyForDeploymentPostprocessing = 0; 367 | }; 368 | 05BC6CDB24533A1100553722 /* Resources */ = { 369 | isa = PBXResourcesBuildPhase; 370 | buildActionMask = 2147483647; 371 | files = ( 372 | ); 373 | runOnlyForDeploymentPostprocessing = 0; 374 | }; 375 | 05BC6CE624533A1100553722 /* Resources */ = { 376 | isa = PBXResourcesBuildPhase; 377 | buildActionMask = 2147483647; 378 | files = ( 379 | ); 380 | runOnlyForDeploymentPostprocessing = 0; 381 | }; 382 | /* End PBXResourcesBuildPhase section */ 383 | 384 | /* Begin PBXSourcesBuildPhase section */ 385 | 05BC6CA32453399700553722 /* Sources */ = { 386 | isa = PBXSourcesBuildPhase; 387 | buildActionMask = 2147483647; 388 | files = ( 389 | 05BC6CC3245339C300553722 /* UIWaveView.swift in Sources */, 390 | ); 391 | runOnlyForDeploymentPostprocessing = 0; 392 | }; 393 | 05BC6CAC2453399700553722 /* Sources */ = { 394 | isa = PBXSourcesBuildPhase; 395 | buildActionMask = 2147483647; 396 | files = ( 397 | 05BC6CB62453399700553722 /* UIWaveViewTests.swift in Sources */, 398 | ); 399 | runOnlyForDeploymentPostprocessing = 0; 400 | }; 401 | 05BC6CC424533A0B00553722 /* Sources */ = { 402 | isa = PBXSourcesBuildPhase; 403 | buildActionMask = 2147483647; 404 | files = ( 405 | 05BC6CCF24533A0B00553722 /* ViewController.swift in Sources */, 406 | 05BC6CCB24533A0B00553722 /* AppDelegate.swift in Sources */, 407 | ); 408 | runOnlyForDeploymentPostprocessing = 0; 409 | }; 410 | 05BC6CD924533A1100553722 /* Sources */ = { 411 | isa = PBXSourcesBuildPhase; 412 | buildActionMask = 2147483647; 413 | files = ( 414 | 05BC6CE224533A1100553722 /* DemoTests.swift in Sources */, 415 | ); 416 | runOnlyForDeploymentPostprocessing = 0; 417 | }; 418 | 05BC6CE424533A1100553722 /* Sources */ = { 419 | isa = PBXSourcesBuildPhase; 420 | buildActionMask = 2147483647; 421 | files = ( 422 | 05BC6CED24533A1100553722 /* DemoUITests.swift in Sources */, 423 | ); 424 | runOnlyForDeploymentPostprocessing = 0; 425 | }; 426 | /* End PBXSourcesBuildPhase section */ 427 | 428 | /* Begin PBXTargetDependency section */ 429 | 05BC6CB32453399700553722 /* PBXTargetDependency */ = { 430 | isa = PBXTargetDependency; 431 | target = 05BC6CA62453399700553722 /* UIWaveView */; 432 | targetProxy = 05BC6CB22453399700553722 /* PBXContainerItemProxy */; 433 | }; 434 | 05BC6CDF24533A1100553722 /* PBXTargetDependency */ = { 435 | isa = PBXTargetDependency; 436 | target = 05BC6CC724533A0B00553722 /* Demo */; 437 | targetProxy = 05BC6CDE24533A1100553722 /* PBXContainerItemProxy */; 438 | }; 439 | 05BC6CEA24533A1100553722 /* PBXTargetDependency */ = { 440 | isa = PBXTargetDependency; 441 | target = 05BC6CC724533A0B00553722 /* Demo */; 442 | targetProxy = 05BC6CE924533A1100553722 /* PBXContainerItemProxy */; 443 | }; 444 | /* End PBXTargetDependency section */ 445 | 446 | /* Begin PBXVariantGroup section */ 447 | 05BC6CD524533A1000553722 /* LaunchScreen.storyboard */ = { 448 | isa = PBXVariantGroup; 449 | children = ( 450 | 05BC6CD624533A1000553722 /* Base */, 451 | ); 452 | name = LaunchScreen.storyboard; 453 | sourceTree = ""; 454 | }; 455 | /* End PBXVariantGroup section */ 456 | 457 | /* Begin XCBuildConfiguration section */ 458 | 05BC6CB92453399700553722 /* Debug */ = { 459 | isa = XCBuildConfiguration; 460 | buildSettings = { 461 | ALWAYS_SEARCH_USER_PATHS = NO; 462 | CLANG_ANALYZER_NONNULL = YES; 463 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 464 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 465 | CLANG_CXX_LIBRARY = "libc++"; 466 | CLANG_ENABLE_MODULES = YES; 467 | CLANG_ENABLE_OBJC_ARC = YES; 468 | CLANG_ENABLE_OBJC_WEAK = YES; 469 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 470 | CLANG_WARN_BOOL_CONVERSION = YES; 471 | CLANG_WARN_COMMA = YES; 472 | CLANG_WARN_CONSTANT_CONVERSION = YES; 473 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 474 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 475 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 476 | CLANG_WARN_EMPTY_BODY = YES; 477 | CLANG_WARN_ENUM_CONVERSION = YES; 478 | CLANG_WARN_INFINITE_RECURSION = YES; 479 | CLANG_WARN_INT_CONVERSION = YES; 480 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 481 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 482 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 483 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 484 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 485 | CLANG_WARN_STRICT_PROTOTYPES = YES; 486 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 487 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 488 | CLANG_WARN_UNREACHABLE_CODE = YES; 489 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 490 | COPY_PHASE_STRIP = NO; 491 | CURRENT_PROJECT_VERSION = 1; 492 | DEBUG_INFORMATION_FORMAT = dwarf; 493 | ENABLE_STRICT_OBJC_MSGSEND = YES; 494 | ENABLE_TESTABILITY = YES; 495 | GCC_C_LANGUAGE_STANDARD = gnu11; 496 | GCC_DYNAMIC_NO_PIC = NO; 497 | GCC_NO_COMMON_BLOCKS = YES; 498 | GCC_OPTIMIZATION_LEVEL = 0; 499 | GCC_PREPROCESSOR_DEFINITIONS = ( 500 | "DEBUG=1", 501 | "$(inherited)", 502 | ); 503 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 504 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 505 | GCC_WARN_UNDECLARED_SELECTOR = YES; 506 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 507 | GCC_WARN_UNUSED_FUNCTION = YES; 508 | GCC_WARN_UNUSED_VARIABLE = YES; 509 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 510 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 511 | MTL_FAST_MATH = YES; 512 | ONLY_ACTIVE_ARCH = YES; 513 | SDKROOT = iphoneos; 514 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 515 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 516 | VERSIONING_SYSTEM = "apple-generic"; 517 | VERSION_INFO_PREFIX = ""; 518 | }; 519 | name = Debug; 520 | }; 521 | 05BC6CBA2453399700553722 /* Release */ = { 522 | isa = XCBuildConfiguration; 523 | buildSettings = { 524 | ALWAYS_SEARCH_USER_PATHS = NO; 525 | CLANG_ANALYZER_NONNULL = YES; 526 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 527 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 528 | CLANG_CXX_LIBRARY = "libc++"; 529 | CLANG_ENABLE_MODULES = YES; 530 | CLANG_ENABLE_OBJC_ARC = YES; 531 | CLANG_ENABLE_OBJC_WEAK = YES; 532 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 533 | CLANG_WARN_BOOL_CONVERSION = YES; 534 | CLANG_WARN_COMMA = YES; 535 | CLANG_WARN_CONSTANT_CONVERSION = YES; 536 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 537 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 538 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 539 | CLANG_WARN_EMPTY_BODY = YES; 540 | CLANG_WARN_ENUM_CONVERSION = YES; 541 | CLANG_WARN_INFINITE_RECURSION = YES; 542 | CLANG_WARN_INT_CONVERSION = YES; 543 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 544 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 545 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 546 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 547 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 548 | CLANG_WARN_STRICT_PROTOTYPES = YES; 549 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 550 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 551 | CLANG_WARN_UNREACHABLE_CODE = YES; 552 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 553 | COPY_PHASE_STRIP = NO; 554 | CURRENT_PROJECT_VERSION = 1; 555 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 556 | ENABLE_NS_ASSERTIONS = NO; 557 | ENABLE_STRICT_OBJC_MSGSEND = YES; 558 | GCC_C_LANGUAGE_STANDARD = gnu11; 559 | GCC_NO_COMMON_BLOCKS = YES; 560 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 561 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 562 | GCC_WARN_UNDECLARED_SELECTOR = YES; 563 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 564 | GCC_WARN_UNUSED_FUNCTION = YES; 565 | GCC_WARN_UNUSED_VARIABLE = YES; 566 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 567 | MTL_ENABLE_DEBUG_INFO = NO; 568 | MTL_FAST_MATH = YES; 569 | SDKROOT = iphoneos; 570 | SWIFT_COMPILATION_MODE = wholemodule; 571 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 572 | VALIDATE_PRODUCT = YES; 573 | VERSIONING_SYSTEM = "apple-generic"; 574 | VERSION_INFO_PREFIX = ""; 575 | }; 576 | name = Release; 577 | }; 578 | 05BC6CBC2453399700553722 /* Debug */ = { 579 | isa = XCBuildConfiguration; 580 | buildSettings = { 581 | CLANG_ENABLE_MODULES = YES; 582 | CODE_SIGN_STYLE = Automatic; 583 | DEFINES_MODULE = YES; 584 | DEVELOPMENT_TEAM = 8AYMHH2W3E; 585 | DYLIB_COMPATIBILITY_VERSION = 1; 586 | DYLIB_CURRENT_VERSION = 1; 587 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 588 | INFOPLIST_FILE = UIWaveView/Info.plist; 589 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 590 | LD_RUNPATH_SEARCH_PATHS = ( 591 | "$(inherited)", 592 | "@executable_path/Frameworks", 593 | "@loader_path/Frameworks", 594 | ); 595 | PRODUCT_BUNDLE_IDENTIFIER = com.onebuffer.UIWaveView; 596 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 597 | SKIP_INSTALL = YES; 598 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 599 | SWIFT_VERSION = 5.0; 600 | TARGETED_DEVICE_FAMILY = "1,2"; 601 | }; 602 | name = Debug; 603 | }; 604 | 05BC6CBD2453399700553722 /* Release */ = { 605 | isa = XCBuildConfiguration; 606 | buildSettings = { 607 | CLANG_ENABLE_MODULES = YES; 608 | CODE_SIGN_STYLE = Automatic; 609 | DEFINES_MODULE = YES; 610 | DEVELOPMENT_TEAM = 8AYMHH2W3E; 611 | DYLIB_COMPATIBILITY_VERSION = 1; 612 | DYLIB_CURRENT_VERSION = 1; 613 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 614 | INFOPLIST_FILE = UIWaveView/Info.plist; 615 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 616 | LD_RUNPATH_SEARCH_PATHS = ( 617 | "$(inherited)", 618 | "@executable_path/Frameworks", 619 | "@loader_path/Frameworks", 620 | ); 621 | PRODUCT_BUNDLE_IDENTIFIER = com.onebuffer.UIWaveView; 622 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 623 | SKIP_INSTALL = YES; 624 | SWIFT_VERSION = 5.0; 625 | TARGETED_DEVICE_FAMILY = "1,2"; 626 | }; 627 | name = Release; 628 | }; 629 | 05BC6CBF2453399700553722 /* Debug */ = { 630 | isa = XCBuildConfiguration; 631 | buildSettings = { 632 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 633 | CODE_SIGN_STYLE = Automatic; 634 | DEVELOPMENT_TEAM = 8AYMHH2W3E; 635 | INFOPLIST_FILE = UIWaveViewTests/Info.plist; 636 | LD_RUNPATH_SEARCH_PATHS = ( 637 | "$(inherited)", 638 | "@executable_path/Frameworks", 639 | "@loader_path/Frameworks", 640 | ); 641 | PRODUCT_BUNDLE_IDENTIFIER = com.onebuffer.UIWaveViewTests; 642 | PRODUCT_NAME = "$(TARGET_NAME)"; 643 | SWIFT_VERSION = 5.0; 644 | TARGETED_DEVICE_FAMILY = "1,2"; 645 | }; 646 | name = Debug; 647 | }; 648 | 05BC6CC02453399700553722 /* Release */ = { 649 | isa = XCBuildConfiguration; 650 | buildSettings = { 651 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 652 | CODE_SIGN_STYLE = Automatic; 653 | DEVELOPMENT_TEAM = 8AYMHH2W3E; 654 | INFOPLIST_FILE = UIWaveViewTests/Info.plist; 655 | LD_RUNPATH_SEARCH_PATHS = ( 656 | "$(inherited)", 657 | "@executable_path/Frameworks", 658 | "@loader_path/Frameworks", 659 | ); 660 | PRODUCT_BUNDLE_IDENTIFIER = com.onebuffer.UIWaveViewTests; 661 | PRODUCT_NAME = "$(TARGET_NAME)"; 662 | SWIFT_VERSION = 5.0; 663 | TARGETED_DEVICE_FAMILY = "1,2"; 664 | }; 665 | name = Release; 666 | }; 667 | 05BC6CF024533A1100553722 /* Debug */ = { 668 | isa = XCBuildConfiguration; 669 | buildSettings = { 670 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 671 | CODE_SIGN_STYLE = Automatic; 672 | DEVELOPMENT_TEAM = 8AYMHH2W3E; 673 | INFOPLIST_FILE = Demo/Info.plist; 674 | LD_RUNPATH_SEARCH_PATHS = ( 675 | "$(inherited)", 676 | "@executable_path/Frameworks", 677 | ); 678 | PRODUCT_BUNDLE_IDENTIFIER = com.onebuffer.Demo; 679 | PRODUCT_NAME = "$(TARGET_NAME)"; 680 | SWIFT_VERSION = 5.0; 681 | TARGETED_DEVICE_FAMILY = "1,2"; 682 | }; 683 | name = Debug; 684 | }; 685 | 05BC6CF124533A1100553722 /* Release */ = { 686 | isa = XCBuildConfiguration; 687 | buildSettings = { 688 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 689 | CODE_SIGN_STYLE = Automatic; 690 | DEVELOPMENT_TEAM = 8AYMHH2W3E; 691 | INFOPLIST_FILE = Demo/Info.plist; 692 | LD_RUNPATH_SEARCH_PATHS = ( 693 | "$(inherited)", 694 | "@executable_path/Frameworks", 695 | ); 696 | PRODUCT_BUNDLE_IDENTIFIER = com.onebuffer.Demo; 697 | PRODUCT_NAME = "$(TARGET_NAME)"; 698 | SWIFT_VERSION = 5.0; 699 | TARGETED_DEVICE_FAMILY = "1,2"; 700 | }; 701 | name = Release; 702 | }; 703 | 05BC6CF324533A1100553722 /* Debug */ = { 704 | isa = XCBuildConfiguration; 705 | buildSettings = { 706 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 707 | BUNDLE_LOADER = "$(TEST_HOST)"; 708 | CODE_SIGN_STYLE = Automatic; 709 | DEVELOPMENT_TEAM = 8AYMHH2W3E; 710 | INFOPLIST_FILE = DemoTests/Info.plist; 711 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 712 | LD_RUNPATH_SEARCH_PATHS = ( 713 | "$(inherited)", 714 | "@executable_path/Frameworks", 715 | "@loader_path/Frameworks", 716 | ); 717 | PRODUCT_BUNDLE_IDENTIFIER = com.onebuffer.DemoTests; 718 | PRODUCT_NAME = "$(TARGET_NAME)"; 719 | SWIFT_VERSION = 5.0; 720 | TARGETED_DEVICE_FAMILY = "1,2"; 721 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Demo.app/Demo"; 722 | }; 723 | name = Debug; 724 | }; 725 | 05BC6CF424533A1100553722 /* Release */ = { 726 | isa = XCBuildConfiguration; 727 | buildSettings = { 728 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 729 | BUNDLE_LOADER = "$(TEST_HOST)"; 730 | CODE_SIGN_STYLE = Automatic; 731 | DEVELOPMENT_TEAM = 8AYMHH2W3E; 732 | INFOPLIST_FILE = DemoTests/Info.plist; 733 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 734 | LD_RUNPATH_SEARCH_PATHS = ( 735 | "$(inherited)", 736 | "@executable_path/Frameworks", 737 | "@loader_path/Frameworks", 738 | ); 739 | PRODUCT_BUNDLE_IDENTIFIER = com.onebuffer.DemoTests; 740 | PRODUCT_NAME = "$(TARGET_NAME)"; 741 | SWIFT_VERSION = 5.0; 742 | TARGETED_DEVICE_FAMILY = "1,2"; 743 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Demo.app/Demo"; 744 | }; 745 | name = Release; 746 | }; 747 | 05BC6CF624533A1100553722 /* Debug */ = { 748 | isa = XCBuildConfiguration; 749 | buildSettings = { 750 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 751 | CODE_SIGN_STYLE = Automatic; 752 | DEVELOPMENT_TEAM = 8AYMHH2W3E; 753 | INFOPLIST_FILE = DemoUITests/Info.plist; 754 | LD_RUNPATH_SEARCH_PATHS = ( 755 | "$(inherited)", 756 | "@executable_path/Frameworks", 757 | "@loader_path/Frameworks", 758 | ); 759 | PRODUCT_BUNDLE_IDENTIFIER = com.onebuffer.DemoUITests; 760 | PRODUCT_NAME = "$(TARGET_NAME)"; 761 | SWIFT_VERSION = 5.0; 762 | TARGETED_DEVICE_FAMILY = "1,2"; 763 | TEST_TARGET_NAME = Demo; 764 | }; 765 | name = Debug; 766 | }; 767 | 05BC6CF724533A1100553722 /* Release */ = { 768 | isa = XCBuildConfiguration; 769 | buildSettings = { 770 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 771 | CODE_SIGN_STYLE = Automatic; 772 | DEVELOPMENT_TEAM = 8AYMHH2W3E; 773 | INFOPLIST_FILE = DemoUITests/Info.plist; 774 | LD_RUNPATH_SEARCH_PATHS = ( 775 | "$(inherited)", 776 | "@executable_path/Frameworks", 777 | "@loader_path/Frameworks", 778 | ); 779 | PRODUCT_BUNDLE_IDENTIFIER = com.onebuffer.DemoUITests; 780 | PRODUCT_NAME = "$(TARGET_NAME)"; 781 | SWIFT_VERSION = 5.0; 782 | TARGETED_DEVICE_FAMILY = "1,2"; 783 | TEST_TARGET_NAME = Demo; 784 | }; 785 | name = Release; 786 | }; 787 | /* End XCBuildConfiguration section */ 788 | 789 | /* Begin XCConfigurationList section */ 790 | 05BC6CA12453399700553722 /* Build configuration list for PBXProject "UIWaveView" */ = { 791 | isa = XCConfigurationList; 792 | buildConfigurations = ( 793 | 05BC6CB92453399700553722 /* Debug */, 794 | 05BC6CBA2453399700553722 /* Release */, 795 | ); 796 | defaultConfigurationIsVisible = 0; 797 | defaultConfigurationName = Release; 798 | }; 799 | 05BC6CBB2453399700553722 /* Build configuration list for PBXNativeTarget "UIWaveView" */ = { 800 | isa = XCConfigurationList; 801 | buildConfigurations = ( 802 | 05BC6CBC2453399700553722 /* Debug */, 803 | 05BC6CBD2453399700553722 /* Release */, 804 | ); 805 | defaultConfigurationIsVisible = 0; 806 | defaultConfigurationName = Release; 807 | }; 808 | 05BC6CBE2453399700553722 /* Build configuration list for PBXNativeTarget "UIWaveViewTests" */ = { 809 | isa = XCConfigurationList; 810 | buildConfigurations = ( 811 | 05BC6CBF2453399700553722 /* Debug */, 812 | 05BC6CC02453399700553722 /* Release */, 813 | ); 814 | defaultConfigurationIsVisible = 0; 815 | defaultConfigurationName = Release; 816 | }; 817 | 05BC6CEF24533A1100553722 /* Build configuration list for PBXNativeTarget "Demo" */ = { 818 | isa = XCConfigurationList; 819 | buildConfigurations = ( 820 | 05BC6CF024533A1100553722 /* Debug */, 821 | 05BC6CF124533A1100553722 /* Release */, 822 | ); 823 | defaultConfigurationIsVisible = 0; 824 | defaultConfigurationName = Release; 825 | }; 826 | 05BC6CF224533A1100553722 /* Build configuration list for PBXNativeTarget "DemoTests" */ = { 827 | isa = XCConfigurationList; 828 | buildConfigurations = ( 829 | 05BC6CF324533A1100553722 /* Debug */, 830 | 05BC6CF424533A1100553722 /* Release */, 831 | ); 832 | defaultConfigurationIsVisible = 0; 833 | defaultConfigurationName = Release; 834 | }; 835 | 05BC6CF524533A1100553722 /* Build configuration list for PBXNativeTarget "DemoUITests" */ = { 836 | isa = XCConfigurationList; 837 | buildConfigurations = ( 838 | 05BC6CF624533A1100553722 /* Debug */, 839 | 05BC6CF724533A1100553722 /* Release */, 840 | ); 841 | defaultConfigurationIsVisible = 0; 842 | defaultConfigurationName = Release; 843 | }; 844 | /* End XCConfigurationList section */ 845 | }; 846 | rootObject = 05BC6C9E2453399700553722 /* Project object */; 847 | } 848 | -------------------------------------------------------------------------------- /UIWaveView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UIWaveView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /UIWaveView/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 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /UIWaveView/Source/UIWaveView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WaveAmimationView.swift 3 | // WaveAnimationView 4 | // 5 | // Created by Cao Phuoc Thanh on 4/23/20. 6 | // Copyright © 2020 Cao Phuoc Thanh. All rights reserved. 7 | // Edit From Source: https://github.com/yourtion/YXWaveView/blob/master/YXWaveView/YXWaveView.swift 8 | 9 | import UIKit 10 | 11 | open class UIWaveView: UIView { 12 | 13 | open var waveCurvature: CGFloat = 1.5 14 | 15 | open var waveSpeed: CGFloat = 0.6 16 | 17 | open var waveHeight: CGFloat = 8 18 | 19 | open var progress:Float { 20 | get{ return _progress } 21 | set{ 22 | guard newValue >= 0 && newValue <= 100 else { return } 23 | self._progress = newValue 24 | } 25 | } 26 | 27 | open var borderColor: UIColor = UIColor.orange { 28 | didSet{ 29 | self.layer.borderColor = self.borderColor.cgColor 30 | } 31 | } 32 | 33 | open var color: UIColor = UIColor.orange { 34 | didSet{ 35 | self.realWaveColor = self.color 36 | if self.color == UIColor.clear { 37 | self.maskWaveColor = self.realWaveColor 38 | } else { 39 | self.maskWaveColor = self.color.withAlphaComponent(0.5) 40 | } 41 | } 42 | } 43 | 44 | /// real wave color 45 | private var realWaveColor: UIColor = UIColor.orange { 46 | didSet { 47 | self.realWaveLayer.fillColor = self.realWaveColor.cgColor 48 | } 49 | } 50 | /// mask wave color 51 | private var maskWaveColor: UIColor = UIColor.orange.withAlphaComponent(0.5) { 52 | didSet { 53 | self.maskWaveLayer.fillColor = self.maskWaveColor.cgColor 54 | } 55 | } 56 | /// float over View 57 | open var overView: UIView? 58 | 59 | fileprivate var _progress: Float = 0 { 60 | didSet{ 61 | var frame = self.bounds 62 | frame.origin.y = frame.size.height - _waveHeight/3 - (frame.size.height/100*CGFloat(_progress)) 63 | if _progress == 0 { 64 | frame.origin.y = frame.size.height + _waveHeight 65 | } 66 | if _progress == 100 { 67 | frame.origin.y = -_waveHeight 68 | } 69 | frame.size.height = self.frame.size.height //_waveHeight 70 | maskWaveLayer.frame = frame 71 | realWaveLayer.frame = frame 72 | } 73 | } 74 | 75 | /// wave timmer 76 | fileprivate var timer: CADisplayLink? 77 | /// real aave 78 | fileprivate var realWaveLayer :CAShapeLayer = CAShapeLayer() 79 | /// mask wave 80 | fileprivate var maskWaveLayer :CAShapeLayer = CAShapeLayer() 81 | 82 | /// offset 83 | fileprivate var offset :CGFloat = 0 84 | 85 | fileprivate var _waveCurvature: CGFloat = 0 86 | fileprivate var _waveSpeed: CGFloat = 0 87 | fileprivate var _waveHeight: CGFloat = 0 88 | fileprivate var _starting: Bool = false 89 | fileprivate var _stoping: Bool = false 90 | 91 | 92 | override init(frame: CGRect) { 93 | super.init(frame: frame) 94 | self.backgroundColor = UIColor.clear 95 | self.realWaveLayer.fillColor = self.realWaveColor.cgColor 96 | self.maskWaveLayer.fillColor = self.maskWaveColor.cgColor 97 | 98 | self.layer.addSublayer(self.realWaveLayer) 99 | self.layer.addSublayer(self.maskWaveLayer) 100 | 101 | 102 | } 103 | 104 | 105 | public convenience init(frame: CGRect, color:UIColor) { 106 | self.init(frame: frame) 107 | self.realWaveColor = color 108 | self.maskWaveColor = color.withAlphaComponent(0.5) 109 | } 110 | 111 | required public init?(coder aDecoder: NSCoder) { 112 | fatalError("init(coder:) has not been implemented") 113 | } 114 | 115 | open func addOverView(_ view: UIView) { 116 | overView = view 117 | overView?.center = self.center 118 | overView?.frame.origin.y = self.frame.height - (overView?.frame.height)! 119 | self.addSubview(overView!) 120 | } 121 | 122 | open func start() { 123 | if !_starting { 124 | _stop() 125 | _starting = true 126 | _stoping = false 127 | _waveHeight = 0 128 | _waveCurvature = 0 129 | _waveSpeed = 0 130 | 131 | timer = CADisplayLink(target: self, selector: #selector(wave)) 132 | timer?.add(to: RunLoop.current, forMode: .common) 133 | } 134 | } 135 | 136 | open func _stop(){ 137 | if (timer != nil) { 138 | timer?.invalidate() 139 | timer = nil 140 | } 141 | } 142 | 143 | open func stop(){ 144 | if !_stoping { 145 | _starting = false 146 | _stoping = true 147 | } 148 | } 149 | 150 | @objc func wave() { 151 | 152 | if _starting { 153 | if _waveHeight < waveHeight { 154 | _waveHeight = _waveHeight + waveHeight/100.0 155 | var frame = self.bounds 156 | frame.origin.y = frame.size.height - _waveHeight/3 - (frame.size.height/100*CGFloat(_progress)) 157 | if _progress == 0 { 158 | frame.origin.y = frame.size.height + _waveHeight 159 | } 160 | if _progress == 100 { 161 | frame.origin.y = -_waveHeight 162 | } 163 | frame.size.height = self.frame.size.height //_waveHeight 164 | maskWaveLayer.frame = frame 165 | realWaveLayer.frame = frame 166 | _waveCurvature = _waveCurvature + waveCurvature / 100.0 167 | _waveSpeed = _waveSpeed + waveSpeed / 100.0 168 | } else { 169 | _starting = false 170 | } 171 | } 172 | 173 | if _stoping { 174 | if _waveHeight > 0 { 175 | _waveHeight = _waveHeight - waveHeight/50.0 176 | var frame = self.bounds 177 | frame.origin.y = frame.size.height - _waveHeight/3 - (frame.size.height/100*CGFloat(_progress)) 178 | if _progress == 0 { 179 | frame.origin.y = frame.size.height + _waveHeight 180 | } 181 | if _progress == 100 { 182 | frame.origin.y = -_waveHeight 183 | } 184 | frame.size.height = _waveHeight 185 | maskWaveLayer.frame = frame 186 | realWaveLayer.frame = frame 187 | _waveCurvature = _waveCurvature - waveCurvature / 50.0 188 | _waveSpeed = _waveSpeed - waveSpeed / 50.0 189 | } else { 190 | _stoping = false 191 | _stop() 192 | } 193 | } 194 | 195 | offset += _waveSpeed 196 | 197 | let width = frame.width 198 | let height = CGFloat(_waveHeight) 199 | 200 | let path = CGMutablePath() 201 | path.move(to: CGPoint(x: 0, y: height)) 202 | 203 | var y: CGFloat = 0 204 | 205 | let maskpath = CGMutablePath() 206 | maskpath.move(to: CGPoint(x: 0, y: height)) 207 | 208 | let offset_f = Float(offset * 0.045) 209 | let waveCurvature_f = Float(0.01 * _waveCurvature) 210 | 211 | for x in 0...Int(width) { 212 | y = height * CGFloat(sinf( waveCurvature_f * Float(x) + offset_f)) 213 | path.addLine(to: CGPoint(x: CGFloat(x), y: y)) 214 | maskpath.addLine(to: CGPoint(x: CGFloat(x), y: -y)) 215 | } 216 | 217 | if (overView != nil) { 218 | let centX = self.bounds.size.width/2 219 | let centY = height * CGFloat(sinf(waveCurvature_f * Float(centX) + offset_f)) 220 | let center = CGPoint(x: centX , y: centY + self.bounds.size.height - overView!.bounds.size.height/2) 221 | overView?.center = center 222 | } 223 | 224 | path.addLine(to: CGPoint(x: width, y: height)) 225 | path.addLine(to: CGPoint(x: width, y: height + self.bounds.size.height)) 226 | path.addLine(to: CGPoint(x: 0, y: height + self.bounds.size.height)) 227 | path.addLine(to: CGPoint(x: 0, y: 0)) 228 | 229 | 230 | maskpath.addLine(to: CGPoint(x: width, y: height)) 231 | maskpath.addLine(to: CGPoint(x: width, y: height + self.bounds.size.height)) 232 | maskpath.addLine(to: CGPoint(x: 0, y: height + self.bounds.size.height)) 233 | maskpath.addLine(to: CGPoint(x: 0, y: 0)) 234 | 235 | maskpath.closeSubpath() 236 | path.closeSubpath() 237 | 238 | 239 | self.realWaveLayer.path = path 240 | 241 | self.maskWaveLayer.path = maskpath 242 | } 243 | 244 | open override func draw(_ rect: CGRect) { 245 | super.draw(rect) 246 | 247 | var frame = rect 248 | frame.origin.y = frame.size.height 249 | maskWaveLayer.frame = frame 250 | realWaveLayer.frame = frame 251 | layer.masksToBounds = true 252 | layer.borderColor = self.borderColor.cgColor 253 | layer.borderWidth = 3 254 | self.start() 255 | } 256 | } 257 | -------------------------------------------------------------------------------- /UIWaveView/UIWaveView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIWaveView.h 3 | // UIWaveView 4 | // 5 | // Created by Cao Phuoc Thanh on 4/24/20. 6 | // Copyright © 2020 Cao Phuoc Thanh. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for UIWaveView. 12 | FOUNDATION_EXPORT double UIWaveViewVersionNumber; 13 | 14 | //! Project version string for UIWaveView. 15 | FOUNDATION_EXPORT const unsigned char UIWaveViewVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /UIWaveViewTests/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 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /UIWaveViewTests/UIWaveViewTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIWaveViewTests.swift 3 | // UIWaveViewTests 4 | // 5 | // Created by Cao Phuoc Thanh on 4/24/20. 6 | // Copyright © 2020 Cao Phuoc Thanh. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import UIWaveView 11 | 12 | class UIWaveViewTests: 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 | --------------------------------------------------------------------------------