iOS 中的 Glassmorphism UI 助手

CHGlassmorphismView

正面照片

⚠️ 仍在进行中 ⚠️

要求

  • iOS 11.0+

安装

使用 Swift 包管理器,方法是将以下行添加到:Package.swift

dependencies: [
 .package(url: "https://github.com/Chaehui-Seo/CHGlassmorphismView.git", from: "0.0.1")
]

Usage

Import the framework

Import module to your controllerCHGlassmorphismView

import CHGlassmorphismView

Create glassmorphismView

You can create glassmorphism view programmatically like code below, or make existing UIView as glassmorphism view by changing the Custom Class to CHGlassmorphismView

let glassmorphismView = CHGlassmorphismView()

Change customizing options

// MARK: - [Theme]
glassmorphismView.setTheme(theme: .light) // choose theme .light or .dark
Light theme dark theme

// MARK: - [Blur Density]
glassmorphismView.changeBlurDensity(with: 0.5) // value from 0 to 1 is available

// MARK: - [Corner Radius]
glassmorphismView.setCornerRadius(30) // change cornerRadius as you want (default value is 20)

GitHub

点击跳转