YourFilm 是一个便捷、功能丰富的 iOS 视图窗口工具,它不仅具备一般 HUD 的显示功能,还提供了更丰富的配置,不再局限于单调的黑白,还可以自定义出现动画和消失动画。
效果预览
说明 | Gif |
---|---|
文本效果 |
![]() |
loading 效果 |
![]() |
要求
- iOS 9.0+
- Xcode 10+
- Swift 4.0+
安装
CocoaPods
target '<Your Target Name>' do
pod 'YourFilm'
end
使用
文字提示使用示例代码
// 定义文本内容
let character = HUD.init(content: HUDContent.label("为了更美好的明天而战~~~~~~", textColor: .white))
//快捷调用
YourFilm.show(character)
//添加自定义背景
var scenery = Scenery()
scenery.spaceEffect = .color(faceBgColorSelector.color)
scenery.stageEffect = .color(stageBgColorSelector.color)
YourFilm.show(character, scenery: scenery)
自定义图片loading
let image = UIImage(named: "com_loading_red")!
YourFilm.showLoading(image: image, title: "正在加载", onView: self.tableView)
系统样式loading
YourFilm.showActivityIndicator(onView: self.tableView)
补充
本仓库将保持不断更新,未来将有更多展示风格。使用过程中如有任何问题或建议,可通过以下方式联系我:
邮箱:[email protected]
许可证
YourFilm基于MIT许可证发布。