SideVolumeHUD
一个漂亮的音量头显示(HUD),出现在您的设备物理音量按钮的右侧。您也可以使用横向样式,看起来也很酷哦 :D
特色功能
- 多种动画可供选择(滑动进出、放大、淡入淡出)
- 所有 选项
- 动画
- 放大
- slideLeftRight -> 默认
- fadeInOut
- 主题
- light
- dark -> 默认
- 方向
- vertical -> 默认
- horizontal
- 动画
示例
示例应用程序是查看SideVolumeHUD的最佳方式。只需打开SideVolumeHUD.xcodeproj文件,并运行Example方案。请记住在实际设备上运行它,因为自定义音量视图在模拟器中不起作用。
截图和视频
安装
CocoaPods [当前不支持 - 进行中]
SideVolumeHUD可通过CocoaPods获取。要安装,只需在您的Podfile中添加以下行即可
pod 'SideVolumeHUD'
Carthage [正常工作]
Carthage是一个去中心化的依赖项管理器,它构建您的依赖项并为您提供二进制框架。
要使用Carthage将SideVolumeHUD集成到您的Xcode项目中,请在您的Cartfile
中指定它
github "illescasDaniel/SideVolumeHUD"
运行carthage update
构建框架,并将构建的SideVolumeHUD.framework
拖入您的Xcode项目。
在您的应用程序目标“构建阶段”设置选项卡中,点击“+”图标,选择“新运行脚本阶段”,并添加在Carthage 快速入门步骤 4、5和6中提到的框架路径
Swift Package Manager [未测试!]
要使用Apple的Swift Package Manager进行集成,请在您的Package.swift
中将以下内容作为依赖项添加
dependencies: [
.package(url: "https://github.com/Daniel Illescas Romero/SideVolumeHUD.git", from: "1.0.0")
]
手动
如果您不想使用上述任何依赖项管理器,可以手动将SideVolumeHUD集成到项目中。只需将Sources
文件夹拖入您的Xcode项目即可。
使用方法
AppDelegate.swift
中,在 application(_, didFinishLaunchingWithOptions)
SideVolumeHUD.hideDefaultVolumeHUD(from: self.window)
SideVolumeHUD.shared.setup(withOptions: [.animationStyle(.slideLeftRight)])
贡献
欢迎贡献力量
许可证
SideVolumeHUD
Copyright (c) 2019 Daniel Illescas Romero [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.