├── .gitignore ├── LCWaveView └── LCWaveView.swift ├── LCWaveViewExample ├── LCWaveViewExample.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── LCWaveViewExample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ └── UserAvatar.imageset │ │ ├── Contents.json │ │ └── UserAvatar.png │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── LICENSE ├── README.md └── Screenshot ├── Screenshot.png └── Screenshot01.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | .build/ 41 | 42 | # CocoaPods 43 | # 44 | # We recommend against adding the Pods directory to your .gitignore. However 45 | # you should judge for yourself, the pros and cons are mentioned at: 46 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 47 | # 48 | # Pods/ 49 | 50 | # Carthage 51 | # 52 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 53 | # Carthage/Checkouts 54 | 55 | Carthage/Build 56 | 57 | # fastlane 58 | # 59 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 60 | # screenshots whenever they are needed. 61 | # For more information about the recommended setup visit: 62 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 63 | 64 | fastlane/report.xml 65 | fastlane/Preview.html 66 | fastlane/screenshots 67 | fastlane/test_output 68 | -------------------------------------------------------------------------------- /LCWaveView/LCWaveView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LCWaveView.swift 3 | // LCWaveViewExample 4 | // 5 | // Created by Liu Chuan on 2017/3/15. 6 | // Copyright © 2017年 LC. All rights reserved. 7 | // 8 | 9 | 10 | import UIKit 11 | 12 | // 波浪曲线动画视图 13 | // 波浪曲线公式:y = h * sin(a * x + b); 14 | // h: 波浪高度, a: 波浪宽度系数, b: 波动的偏移量 15 | 16 | /// 波浪视图 17 | class LCWaveView: UIView { 18 | 19 | // MARK: - 公开属性 20 | 21 | /// 波浪宽度系数 -> a 22 | public var waveRate: CGFloat = 1.5 23 | 24 | /// 波动速度(默认值:0.5 取值 0 ~ 1) 25 | public var waveSpeed: CGFloat = 0.5 26 | 27 | /// 波动的高度 -> h (默认值: 5) 28 | public var waveHeight: CGFloat = 5 29 | 30 | /// 真实波动图层颜色 31 | public var realWaveColor: UIColor = UIColor.white { 32 | didSet { 33 | realWaveLayer.fillColor = realWaveColor.cgColor 34 | } 35 | } 36 | /// 蒙版波动图层颜色 37 | public var maskWaveColor: UIColor = UIColor.white { 38 | didSet { 39 | maskWaveLayer.fillColor = maskWaveColor.cgColor 40 | } 41 | } 42 | 43 | /// 波动完成回调 44 | public var completion: ((_ centerY: CGFloat)->())? 45 | 46 | 47 | // MARK: - 私有属性 48 | 49 | /// 真实波动图层 50 | private lazy var realWaveLayer: CAShapeLayer = CAShapeLayer() 51 | 52 | /// 蒙版波动图层 53 | private lazy var maskWaveLayer: CAShapeLayer = CAShapeLayer() 54 | 55 | /// 屏幕刷新率定时器 56 | private var waveDisplayLink: CADisplayLink? 57 | 58 | /// 波浪的偏移量 -> b 59 | private var offset: CGFloat = 0 60 | 61 | /// 频率 62 | private var priFrequency: CGFloat = 0 63 | 64 | /// 速度 65 | private var priWaveSpeed: CGFloat = 0 66 | 67 | /// 高度 68 | private var priWaveHeight: CGFloat = 0 69 | 70 | /// 定义变量记录波动视图的状态 -开始(默认为:false) 71 | private var isStarting: Bool = false 72 | 73 | /// 定义变量记录波动视图的状态 -停止(默认为:false) 74 | private var isStopping: Bool = false 75 | 76 | 77 | // MARK: - 初始化 78 | override init(frame: CGRect) { 79 | super.init(frame: frame) 80 | 81 | var tempf = bounds 82 | tempf.origin.y = frame.size.height 83 | tempf.size.height = 0 84 | 85 | maskWaveLayer.frame = tempf 86 | realWaveLayer.frame = tempf 87 | 88 | backgroundColor = .clear 89 | layer.addSublayer(realWaveLayer) 90 | layer.addSublayer(maskWaveLayer) 91 | } 92 | 93 | // MARK: - 便利构造器 94 | 95 | /// 初始化波浪视图的尺寸位置,以及颜色 96 | /// 97 | /// - Parameters: 98 | /// - frame: 尺寸位置 99 | /// - color: 颜色 100 | convenience init(frame: CGRect, color: UIColor) { 101 | self.init(frame: frame) 102 | 103 | realWaveColor = color 104 | maskWaveColor = color.withAlphaComponent(0.7) 105 | realWaveLayer.fillColor = realWaveColor.cgColor // 图层的填充颜色 106 | maskWaveLayer.fillColor = maskWaveColor.cgColor 107 | } 108 | 109 | required init?(coder aDecoder: NSCoder) { 110 | fatalError("init(coder:) has not been implemented") 111 | } 112 | } 113 | 114 | // MARK: - Method 115 | extension LCWaveView { 116 | 117 | /// 开始波动 118 | public func startWave() { 119 | 120 | if !isStarting { 121 | 122 | removeTimer() // 先移除屏幕刷新率定时器 123 | isStarting = true 124 | isStopping = false 125 | 126 | /* CADisplayLink:一个和屏幕刷新率相同的定时器,需要以特定的模式注册到runloop中,每次屏幕刷新时,会调用绑定的target上的selector这个方法。 127 | duration:每帧之间的时间 128 | pause:暂停,设置true为暂停,false为继续 129 | 结束时,需要调用invalidate方法,并且从runloop中删除之前绑定的target跟selector。 130 | 不能被继承 131 | */ 132 | // 开启定时器 133 | waveDisplayLink = CADisplayLink(target: self, selector: #selector(waveEvent)) 134 | waveDisplayLink?.add(to: .current, forMode: RunLoop.Mode.common) 135 | } 136 | } 137 | 138 | /// 停止波动 139 | public func stopWave() { 140 | if !isStopping { 141 | isStarting = false 142 | isStopping = true 143 | } 144 | } 145 | 146 | /// 移除定时器 147 | private func removeTimer() { 148 | // 从运行循环中移除定时器 149 | waveDisplayLink?.invalidate() 150 | waveDisplayLink = nil 151 | } 152 | 153 | /// 浮动事件 154 | @objc func waveEvent() { 155 | 156 | 157 | if isStarting { 158 | BeganToWave() 159 | } 160 | if isStopping { 161 | endToWave() 162 | } 163 | other() 164 | } 165 | 166 | } 167 | 168 | 169 | // MARK: - 浮动的三种状态(开始、结束、其他) 170 | extension LCWaveView { 171 | 172 | /// 开始波动起来 173 | private func BeganToWave() { 174 | guard priWaveHeight < waveHeight else { 175 | isStarting = false 176 | return 177 | } 178 | priWaveHeight = priWaveHeight + waveHeight / 100 179 | 180 | // 1.用一个临时变量,保存当前视图的尺寸 181 | var f = self.bounds 182 | 183 | // 2.给这个变量赋值 184 | f.origin.y = f.size.height - priWaveHeight 185 | f.size.height = priWaveHeight 186 | 187 | // 3.修改frame的值 188 | maskWaveLayer.frame = f 189 | realWaveLayer.frame = f 190 | priFrequency = priFrequency + waveRate / 100 191 | priWaveSpeed = priWaveSpeed + waveSpeed / 100 192 | } 193 | 194 | /// 结束波动 195 | private func endToWave() { 196 | guard priWaveHeight > 0 else { // 停止 197 | isStopping = false 198 | stopWave() 199 | return 200 | } 201 | priWaveHeight = priWaveHeight - waveHeight / 50.0 202 | 203 | // 1.用一个临时变量,保存当前视图的尺寸 204 | var f = self.bounds 205 | 206 | // 2.给这个变量赋值 207 | f.origin.y = f.size.height 208 | f.size.height = priWaveHeight 209 | 210 | // 3.修改frame的值 211 | maskWaveLayer.frame = f 212 | realWaveLayer.frame = f 213 | priFrequency = priFrequency - waveRate / 50.0 214 | priWaveSpeed = priWaveSpeed - waveSpeed / 50.0 215 | } 216 | 217 | /// 其他情况 218 | private func other() { 219 | 220 | // 波浪移动的关键:按照指定的速度偏移 221 | offset += priWaveSpeed 222 | 223 | var y: CGFloat = 0.0 224 | let width: CGFloat = frame.width 225 | let height: CGFloat = priWaveHeight 226 | 227 | // 创建可变图形路径1、2 228 | let realPath = CGMutablePath() 229 | let maskPath = CGMutablePath() 230 | 231 | // 开始指定一个新的子路径。 232 | realPath.move(to: CGPoint(x: 0, y: height)) 233 | maskPath.move(to: CGPoint(x: 0, y: height)) 234 | 235 | let offset_f = Float(offset * 0.045) 236 | 237 | let waveFrequency_f = Float(0.01 * priFrequency) 238 | 239 | for x in 0...Int(width) { 240 | 241 | // 波浪曲线 242 | y = height * CGFloat(sin(waveFrequency_f * Float(x) + offset_f)) 243 | 244 | // 把这些点用先的形式绘制路径 245 | realPath.addLine(to: CGPoint(x: CGFloat(x), y: y)) 246 | maskPath.addLine(to: CGPoint(x: CGFloat(x), y: -y)) 247 | } 248 | 249 | let midX = bounds.size.width * 0.5 250 | let midY = height * sin(midX * CGFloat(waveFrequency_f) + CGFloat(offset_f)) 251 | 252 | if let callback = completion { 253 | callback(midY) 254 | } 255 | 256 | // 1.从当前点到指定点, 用线的形式绘制路径 257 | realPath.addLine(to: CGPoint(x: width, y: height)) 258 | realPath.addLine(to: CGPoint(x: 0, y: height)) 259 | maskPath.addLine(to: CGPoint(x: width, y: height)) 260 | maskPath.addLine(to: CGPoint(x: 0, y: height)) 261 | // 2.关闭路径 262 | maskPath.closeSubpath() 263 | realPath.closeSubpath() 264 | // 3.赋值路径 265 | realWaveLayer.path = realPath 266 | maskWaveLayer.path = maskPath 267 | } 268 | 269 | } 270 | 271 | -------------------------------------------------------------------------------- /LCWaveViewExample/LCWaveViewExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 48; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6BB44F042040136900209024 /* LCWaveView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BB44F032040136900209024 /* LCWaveView.swift */; }; 11 | 6BFC165E20401309007C2158 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BFC165D20401309007C2158 /* AppDelegate.swift */; }; 12 | 6BFC166020401309007C2158 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BFC165F20401309007C2158 /* ViewController.swift */; }; 13 | 6BFC166320401309007C2158 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6BFC166120401309007C2158 /* Main.storyboard */; }; 14 | 6BFC166520401309007C2158 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6BFC166420401309007C2158 /* Assets.xcassets */; }; 15 | 6BFC166820401309007C2158 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6BFC166620401309007C2158 /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXFileReference section */ 19 | 6BB44F032040136900209024 /* LCWaveView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LCWaveView.swift; sourceTree = ""; }; 20 | 6BFC165A20401309007C2158 /* LCWaveViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LCWaveViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 21 | 6BFC165D20401309007C2158 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 22 | 6BFC165F20401309007C2158 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 23 | 6BFC166220401309007C2158 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 24 | 6BFC166420401309007C2158 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 25 | 6BFC166720401309007C2158 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 26 | 6BFC166920401309007C2158 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 27 | /* End PBXFileReference section */ 28 | 29 | /* Begin PBXFrameworksBuildPhase section */ 30 | 6BFC165720401309007C2158 /* Frameworks */ = { 31 | isa = PBXFrameworksBuildPhase; 32 | buildActionMask = 2147483647; 33 | files = ( 34 | ); 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXFrameworksBuildPhase section */ 38 | 39 | /* Begin PBXGroup section */ 40 | 6BB44F022040136900209024 /* LCWaveView */ = { 41 | isa = PBXGroup; 42 | children = ( 43 | 6BB44F032040136900209024 /* LCWaveView.swift */, 44 | ); 45 | name = LCWaveView; 46 | path = ../../LCWaveView; 47 | sourceTree = ""; 48 | }; 49 | 6BFC165120401309007C2158 = { 50 | isa = PBXGroup; 51 | children = ( 52 | 6BFC165C20401309007C2158 /* LCWaveViewExample */, 53 | 6BFC165B20401309007C2158 /* Products */, 54 | ); 55 | sourceTree = ""; 56 | }; 57 | 6BFC165B20401309007C2158 /* Products */ = { 58 | isa = PBXGroup; 59 | children = ( 60 | 6BFC165A20401309007C2158 /* LCWaveViewExample.app */, 61 | ); 62 | name = Products; 63 | sourceTree = ""; 64 | }; 65 | 6BFC165C20401309007C2158 /* LCWaveViewExample */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | 6BB44F022040136900209024 /* LCWaveView */, 69 | 6BFC165D20401309007C2158 /* AppDelegate.swift */, 70 | 6BFC165F20401309007C2158 /* ViewController.swift */, 71 | 6BFC166120401309007C2158 /* Main.storyboard */, 72 | 6BFC166420401309007C2158 /* Assets.xcassets */, 73 | 6BFC166620401309007C2158 /* LaunchScreen.storyboard */, 74 | 6BFC166920401309007C2158 /* Info.plist */, 75 | ); 76 | path = LCWaveViewExample; 77 | sourceTree = ""; 78 | }; 79 | /* End PBXGroup section */ 80 | 81 | /* Begin PBXNativeTarget section */ 82 | 6BFC165920401309007C2158 /* LCWaveViewExample */ = { 83 | isa = PBXNativeTarget; 84 | buildConfigurationList = 6BFC166C20401309007C2158 /* Build configuration list for PBXNativeTarget "LCWaveViewExample" */; 85 | buildPhases = ( 86 | 6BFC165620401309007C2158 /* Sources */, 87 | 6BFC165720401309007C2158 /* Frameworks */, 88 | 6BFC165820401309007C2158 /* Resources */, 89 | ); 90 | buildRules = ( 91 | ); 92 | dependencies = ( 93 | ); 94 | name = LCWaveViewExample; 95 | productName = LCWaveViewExample; 96 | productReference = 6BFC165A20401309007C2158 /* LCWaveViewExample.app */; 97 | productType = "com.apple.product-type.application"; 98 | }; 99 | /* End PBXNativeTarget section */ 100 | 101 | /* Begin PBXProject section */ 102 | 6BFC165220401309007C2158 /* Project object */ = { 103 | isa = PBXProject; 104 | attributes = { 105 | LastSwiftUpdateCheck = 0920; 106 | LastUpgradeCheck = 1000; 107 | ORGANIZATIONNAME = LC; 108 | TargetAttributes = { 109 | 6BFC165920401309007C2158 = { 110 | CreatedOnToolsVersion = 9.2; 111 | LastSwiftMigration = 1120; 112 | ProvisioningStyle = Automatic; 113 | }; 114 | }; 115 | }; 116 | buildConfigurationList = 6BFC165520401309007C2158 /* Build configuration list for PBXProject "LCWaveViewExample" */; 117 | compatibilityVersion = "Xcode 8.0"; 118 | developmentRegion = en; 119 | hasScannedForEncodings = 0; 120 | knownRegions = ( 121 | en, 122 | Base, 123 | ); 124 | mainGroup = 6BFC165120401309007C2158; 125 | productRefGroup = 6BFC165B20401309007C2158 /* Products */; 126 | projectDirPath = ""; 127 | projectRoot = ""; 128 | targets = ( 129 | 6BFC165920401309007C2158 /* LCWaveViewExample */, 130 | ); 131 | }; 132 | /* End PBXProject section */ 133 | 134 | /* Begin PBXResourcesBuildPhase section */ 135 | 6BFC165820401309007C2158 /* Resources */ = { 136 | isa = PBXResourcesBuildPhase; 137 | buildActionMask = 2147483647; 138 | files = ( 139 | 6BFC166820401309007C2158 /* LaunchScreen.storyboard in Resources */, 140 | 6BFC166520401309007C2158 /* Assets.xcassets in Resources */, 141 | 6BFC166320401309007C2158 /* Main.storyboard in Resources */, 142 | ); 143 | runOnlyForDeploymentPostprocessing = 0; 144 | }; 145 | /* End PBXResourcesBuildPhase section */ 146 | 147 | /* Begin PBXSourcesBuildPhase section */ 148 | 6BFC165620401309007C2158 /* Sources */ = { 149 | isa = PBXSourcesBuildPhase; 150 | buildActionMask = 2147483647; 151 | files = ( 152 | 6BFC166020401309007C2158 /* ViewController.swift in Sources */, 153 | 6BB44F042040136900209024 /* LCWaveView.swift in Sources */, 154 | 6BFC165E20401309007C2158 /* AppDelegate.swift in Sources */, 155 | ); 156 | runOnlyForDeploymentPostprocessing = 0; 157 | }; 158 | /* End PBXSourcesBuildPhase section */ 159 | 160 | /* Begin PBXVariantGroup section */ 161 | 6BFC166120401309007C2158 /* Main.storyboard */ = { 162 | isa = PBXVariantGroup; 163 | children = ( 164 | 6BFC166220401309007C2158 /* Base */, 165 | ); 166 | name = Main.storyboard; 167 | sourceTree = ""; 168 | }; 169 | 6BFC166620401309007C2158 /* LaunchScreen.storyboard */ = { 170 | isa = PBXVariantGroup; 171 | children = ( 172 | 6BFC166720401309007C2158 /* Base */, 173 | ); 174 | name = LaunchScreen.storyboard; 175 | sourceTree = ""; 176 | }; 177 | /* End PBXVariantGroup section */ 178 | 179 | /* Begin XCBuildConfiguration section */ 180 | 6BFC166A20401309007C2158 /* Debug */ = { 181 | isa = XCBuildConfiguration; 182 | buildSettings = { 183 | ALWAYS_SEARCH_USER_PATHS = NO; 184 | CLANG_ANALYZER_NONNULL = YES; 185 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 186 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 187 | CLANG_CXX_LIBRARY = "libc++"; 188 | CLANG_ENABLE_MODULES = YES; 189 | CLANG_ENABLE_OBJC_ARC = YES; 190 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 191 | CLANG_WARN_BOOL_CONVERSION = YES; 192 | CLANG_WARN_COMMA = YES; 193 | CLANG_WARN_CONSTANT_CONVERSION = YES; 194 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 195 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 196 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 197 | CLANG_WARN_EMPTY_BODY = YES; 198 | CLANG_WARN_ENUM_CONVERSION = YES; 199 | CLANG_WARN_INFINITE_RECURSION = YES; 200 | CLANG_WARN_INT_CONVERSION = YES; 201 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 202 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 203 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 204 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 205 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 206 | CLANG_WARN_STRICT_PROTOTYPES = YES; 207 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 208 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 209 | CLANG_WARN_UNREACHABLE_CODE = YES; 210 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 211 | CODE_SIGN_IDENTITY = "iPhone Developer"; 212 | COPY_PHASE_STRIP = NO; 213 | DEBUG_INFORMATION_FORMAT = dwarf; 214 | ENABLE_STRICT_OBJC_MSGSEND = YES; 215 | ENABLE_TESTABILITY = YES; 216 | GCC_C_LANGUAGE_STANDARD = gnu11; 217 | GCC_DYNAMIC_NO_PIC = NO; 218 | GCC_NO_COMMON_BLOCKS = YES; 219 | GCC_OPTIMIZATION_LEVEL = 0; 220 | GCC_PREPROCESSOR_DEFINITIONS = ( 221 | "DEBUG=1", 222 | "$(inherited)", 223 | ); 224 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 225 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 226 | GCC_WARN_UNDECLARED_SELECTOR = YES; 227 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 228 | GCC_WARN_UNUSED_FUNCTION = YES; 229 | GCC_WARN_UNUSED_VARIABLE = YES; 230 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 231 | MTL_ENABLE_DEBUG_INFO = YES; 232 | ONLY_ACTIVE_ARCH = YES; 233 | SDKROOT = iphoneos; 234 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 235 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 236 | SWIFT_VERSION = 5.0; 237 | }; 238 | name = Debug; 239 | }; 240 | 6BFC166B20401309007C2158 /* Release */ = { 241 | isa = XCBuildConfiguration; 242 | buildSettings = { 243 | ALWAYS_SEARCH_USER_PATHS = NO; 244 | CLANG_ANALYZER_NONNULL = YES; 245 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 246 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 247 | CLANG_CXX_LIBRARY = "libc++"; 248 | CLANG_ENABLE_MODULES = YES; 249 | CLANG_ENABLE_OBJC_ARC = YES; 250 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 251 | CLANG_WARN_BOOL_CONVERSION = YES; 252 | CLANG_WARN_COMMA = YES; 253 | CLANG_WARN_CONSTANT_CONVERSION = YES; 254 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 255 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 256 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 257 | CLANG_WARN_EMPTY_BODY = YES; 258 | CLANG_WARN_ENUM_CONVERSION = YES; 259 | CLANG_WARN_INFINITE_RECURSION = YES; 260 | CLANG_WARN_INT_CONVERSION = YES; 261 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 262 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 263 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 264 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 265 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 266 | CLANG_WARN_STRICT_PROTOTYPES = YES; 267 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 268 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 269 | CLANG_WARN_UNREACHABLE_CODE = YES; 270 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 271 | CODE_SIGN_IDENTITY = "iPhone Developer"; 272 | COPY_PHASE_STRIP = NO; 273 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 274 | ENABLE_NS_ASSERTIONS = NO; 275 | ENABLE_STRICT_OBJC_MSGSEND = YES; 276 | GCC_C_LANGUAGE_STANDARD = gnu11; 277 | GCC_NO_COMMON_BLOCKS = YES; 278 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 279 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 280 | GCC_WARN_UNDECLARED_SELECTOR = YES; 281 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 282 | GCC_WARN_UNUSED_FUNCTION = YES; 283 | GCC_WARN_UNUSED_VARIABLE = YES; 284 | IPHONEOS_DEPLOYMENT_TARGET = 11.2; 285 | MTL_ENABLE_DEBUG_INFO = NO; 286 | SDKROOT = iphoneos; 287 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 288 | SWIFT_VERSION = 5.0; 289 | VALIDATE_PRODUCT = YES; 290 | }; 291 | name = Release; 292 | }; 293 | 6BFC166D20401309007C2158 /* Debug */ = { 294 | isa = XCBuildConfiguration; 295 | buildSettings = { 296 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 297 | CODE_SIGN_STYLE = Automatic; 298 | INFOPLIST_FILE = LCWaveViewExample/Info.plist; 299 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 300 | PRODUCT_BUNDLE_IDENTIFIER = com.LC.LCWaveViewExample; 301 | PRODUCT_NAME = "$(TARGET_NAME)"; 302 | SWIFT_VERSION = 5.0; 303 | TARGETED_DEVICE_FAMILY = "1,2"; 304 | }; 305 | name = Debug; 306 | }; 307 | 6BFC166E20401309007C2158 /* Release */ = { 308 | isa = XCBuildConfiguration; 309 | buildSettings = { 310 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 311 | CODE_SIGN_STYLE = Automatic; 312 | INFOPLIST_FILE = LCWaveViewExample/Info.plist; 313 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 314 | PRODUCT_BUNDLE_IDENTIFIER = com.LC.LCWaveViewExample; 315 | PRODUCT_NAME = "$(TARGET_NAME)"; 316 | SWIFT_VERSION = 5.0; 317 | TARGETED_DEVICE_FAMILY = "1,2"; 318 | }; 319 | name = Release; 320 | }; 321 | /* End XCBuildConfiguration section */ 322 | 323 | /* Begin XCConfigurationList section */ 324 | 6BFC165520401309007C2158 /* Build configuration list for PBXProject "LCWaveViewExample" */ = { 325 | isa = XCConfigurationList; 326 | buildConfigurations = ( 327 | 6BFC166A20401309007C2158 /* Debug */, 328 | 6BFC166B20401309007C2158 /* Release */, 329 | ); 330 | defaultConfigurationIsVisible = 0; 331 | defaultConfigurationName = Release; 332 | }; 333 | 6BFC166C20401309007C2158 /* Build configuration list for PBXNativeTarget "LCWaveViewExample" */ = { 334 | isa = XCConfigurationList; 335 | buildConfigurations = ( 336 | 6BFC166D20401309007C2158 /* Debug */, 337 | 6BFC166E20401309007C2158 /* Release */, 338 | ); 339 | defaultConfigurationIsVisible = 0; 340 | defaultConfigurationName = Release; 341 | }; 342 | /* End XCConfigurationList section */ 343 | }; 344 | rootObject = 6BFC165220401309007C2158 /* Project object */; 345 | } 346 | -------------------------------------------------------------------------------- /LCWaveViewExample/LCWaveViewExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LCWaveViewExample/LCWaveViewExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /LCWaveViewExample/LCWaveViewExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // LCWaveViewExample 4 | // 5 | // Created by Liu Chuan on 2018/2/23. 6 | // Copyright © 2018年 LC. 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 | -------------------------------------------------------------------------------- /LCWaveViewExample/LCWaveViewExample/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 | } -------------------------------------------------------------------------------- /LCWaveViewExample/LCWaveViewExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /LCWaveViewExample/LCWaveViewExample/Assets.xcassets/UserAvatar.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "filename" : "UserAvatar.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /LCWaveViewExample/LCWaveViewExample/Assets.xcassets/UserAvatar.imageset/UserAvatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevLiuSir/LCWaveView/0202e028a1415d8bc7b8197eebf563529b3cc36c/LCWaveViewExample/LCWaveViewExample/Assets.xcassets/UserAvatar.imageset/UserAvatar.png -------------------------------------------------------------------------------- /LCWaveViewExample/LCWaveViewExample/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 | -------------------------------------------------------------------------------- /LCWaveViewExample/LCWaveViewExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /LCWaveViewExample/LCWaveViewExample/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 | UIStatusBarStyle 32 | UIStatusBarStyleLightContent 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIViewControllerBasedStatusBarAppearance 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /LCWaveViewExample/LCWaveViewExample/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // LCWaveViewExample 4 | // 5 | // Created by Liu Chuan on 2018/2/23. 6 | // Copyright © 2018年 LC. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | /// 屏幕的宽度 12 | private let screenW = UIScreen.main.bounds.width 13 | 14 | /// 头像视图的宽度 15 | private let iconImageWidth: CGFloat = 100 16 | 17 | /// 波动视图的高度 18 | private let waveViewHeight: CGFloat = 200 19 | 20 | /// 单元格重用标识符 21 | private let identifier = "cellID" 22 | 23 | 24 | 25 | class ViewController: UIViewController { 26 | 27 | /// 表格 28 | @IBOutlet weak var table: UITableView! 29 | 30 | // MARK: - Lazy Loading 31 | 32 | /** LCWaveView **/ 33 | private lazy var waveView: LCWaveView = { 34 | let waveView = LCWaveView(frame: CGRect(x: 0, y: 0, width: screenW, height: waveViewHeight), color: .white) 35 | waveView.waveRate = 2 36 | waveView.waveSpeed = 1 37 | waveView.waveHeight = 7 38 | return waveView 39 | }() 40 | 41 | /// 头像视图 42 | private lazy var iconImageView: UIImageView = { 43 | let image = UIImageView(frame: CGRect(x: screenW / 2 - iconImageWidth / 2, y: 0, width: iconImageWidth, height: iconImageWidth)) 44 | image.layer.borderColor = UIColor.white.cgColor 45 | image.layer.cornerRadius = image.bounds.width / 2 46 | image.layer.masksToBounds = true 47 | image.layer.borderWidth = 3 48 | image.layer.contents = UIImage(named: "UserAvatar.png")?.cgImage 49 | return image 50 | }() 51 | 52 | 53 | // MARK: - View Life Cycle 54 | override func viewDidLoad() { 55 | super.viewDidLoad() 56 | 57 | configUI() 58 | } 59 | } 60 | 61 | // MARK: - Custom Method 62 | extension ViewController { 63 | 64 | /// 配置UI界面 65 | private func configUI() { 66 | configTableView() 67 | configWaveView() 68 | } 69 | 70 | /// 配置波动视图 71 | private func configWaveView() { 72 | waveView.completion = { centerY in // 波浪动画回调 73 | // 同步更新头像视图的y坐标 74 | self.iconImageView.frame.origin.y = waveViewHeight + centerY - iconImageWidth 75 | } 76 | waveView.addSubview(iconImageView) 77 | waveView.startWave() 78 | } 79 | 80 | /// 配置表格 81 | private func configTableView() { 82 | table.backgroundColor = .red 83 | table.dataSource = self 84 | table.register(UITableViewCell.self, forCellReuseIdentifier: identifier) 85 | table.contentInset = UIEdgeInsets(top: 100, left: 0, bottom: 0, right: 0) 86 | table.tableHeaderView = waveView 87 | } 88 | } 89 | 90 | // MARK: - UITableViewDataSource 91 | extension ViewController: UITableViewDataSource { 92 | 93 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 94 | return 20 95 | } 96 | 97 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 98 | let cell = tableView.dequeueReusableCell(withIdentifier: identifier, for: indexPath) 99 | cell.textLabel?.text = "\(indexPath.row)" 100 | return cell 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Mr Liu 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 | 2 | 3 | 4 |

5 |

6 | 7 | 8 |

LCWaveView is a water wave animation.

9 | 10 | 11 | ![Languages](https://img.shields.io/badge/language-swift%20-orange.svg?style=flat) 12 | [![Swift Version](https://img.shields.io/badge/swift-5.1+-blue.svg?style=flat)](https://developer.apple.com/swift/) 13 | ![Xcode Version](https://img.shields.io/badge/xcode-11+-yellow.svg) 14 | ![build ](https://img.shields.io/appveyor/ci/gruntjs/grunt/master.svg) 15 | ![platform](https://img.shields.io/badge/platform-ios-lightgrey.svg) 16 | ![GitHub starts](https://img.shields.io/github/stars/ChinaHackers/LCWaveView.svg?style=social&label=Stars) 17 | ![GitHub fork](https://img.shields.io/github/forks/ChinaHackers/LCWaveView.svg?style=social&label=Fork) 18 | [![Twitter Follow](https://img.shields.io/twitter/follow/LiuChuan_.svg?style=social)](https://twitter.com/LiuChuan_) 19 | 20 | 21 | ## Screencast 22 | 23 |

24 |

25 | 26 | 27 | ### Author 28 | | [](https://github.com/ChinaHackers) | [Mr Liu](https://github.com/ChinaHackers)

Software Engineer
[![Twitter][1.1]][1] [![Github][2.1]][2] [![LinkedIn][3.1]][3] | 29 | | :------------: | :------------: | 30 | 31 | [1.1]: http://i.imgur.com/wWzX9uB.png (twitter icon without padding) 32 | [2.1]: http://i.imgur.com/9I6NRUm.png (github icon without padding) 33 | [3.1]: https://www.kingsfund.org.uk/themes/custom/kingsfund/dist/img/svg/sprite-icon-linkedin.svg (linkedin icon) 34 | 35 | [1]: https://twitter.com/LiuChuan_ 36 | [2]: https://github.com/ChinaHackers 37 | [3]: https://www.linkedin.com/in/chuan-liu-00359115a/ 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Screenshot/Screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevLiuSir/LCWaveView/0202e028a1415d8bc7b8197eebf563529b3cc36c/Screenshot/Screenshot.png -------------------------------------------------------------------------------- /Screenshot/Screenshot01.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevLiuSir/LCWaveView/0202e028a1415d8bc7b8197eebf563529b3cc36c/Screenshot/Screenshot01.gif --------------------------------------------------------------------------------