HSongPopUpAssistant
HSongPopUpAssistant是一个高度自由化的自定义弹窗助手,同时它还默认搭载了精美的提示弹窗。
1.样例





2.安装
CocoaPods
- 在你的podfile中新增:
pod 'HSongPopUpAssistant'
- 然后在你的终端里
pod install
3.使用
- 只需要
import HSongPopUpAssistant
- 然后你就可以:
// pop reset toast PopUpAssistant.shared.showToast(.success, mainTitle: "提交成功", subTitle: "提交是真的成功了") // pop your custom view let centerView = CustomCenterView(frame: CGRect(x: 0, y: 0, width: 300, height: 230)) centerView.layer.cornerRadius = 15 PopUpAssistant.shared.showCustomView(centerView, position: .center, useCover: true)
- 对于预设的弹窗,你可以进行以下设置
public struct PopUpConfigure {
/// 主背景色
var mainBgColor = UIColor.white
/// 主标题颜色
var mainTitColor = UIColor("333333")
/// 副标题颜色
var subTitColor = UIColor("666666")
/// 主图标
var mainIconName = "app_success_circle"
/// 主标题
var mainTitle = "加载成功"
/// 副标题
var subTitle = "副标题这里是"
/// 弹窗类型
var toastType = PopUpToastType.success
/// 需要震动效果
var haveVibration = false
}
4.作者
HisongMo(old: Thered-key)
5.从Github中打开
喜欢的给个星星吧~