mirror of https://github.com/xaoxuu/ProHUD
增加默认限制的行数;action没有handle时默认会pop
This commit is contained in:
parent
1b4f42716b
commit
03eebc6c93
|
@ -15,7 +15,7 @@
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "CDA4E03720D3935B00CD2A0C"
|
BlueprintIdentifier = "CDA4E03720D3935B00CD2A0C"
|
||||||
BuildableName = "Example.app"
|
BuildableName = "ProHUD (Xcode11之前的老项目).app"
|
||||||
BlueprintName = "Example"
|
BlueprintName = "Example"
|
||||||
ReferencedContainer = "container:Example.xcodeproj">
|
ReferencedContainer = "container:Example.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "CDA4E03720D3935B00CD2A0C"
|
BlueprintIdentifier = "CDA4E03720D3935B00CD2A0C"
|
||||||
BuildableName = "Example.app"
|
BuildableName = "ProHUD (Xcode11之前的老项目).app"
|
||||||
BlueprintName = "Example"
|
BlueprintName = "Example"
|
||||||
ReferencedContainer = "container:Example.xcodeproj">
|
ReferencedContainer = "container:Example.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
<BuildableReference
|
<BuildableReference
|
||||||
BuildableIdentifier = "primary"
|
BuildableIdentifier = "primary"
|
||||||
BlueprintIdentifier = "CDA4E03720D3935B00CD2A0C"
|
BlueprintIdentifier = "CDA4E03720D3935B00CD2A0C"
|
||||||
BuildableName = "Example.app"
|
BuildableName = "ProHUD (Xcode11之前的老项目).app"
|
||||||
BlueprintName = "Example"
|
BlueprintName = "Example"
|
||||||
ReferencedContainer = "container:Example.xcodeproj">
|
ReferencedContainer = "container:Example.xcodeproj">
|
||||||
</BuildableReference>
|
</BuildableReference>
|
||||||
|
|
|
@ -23,7 +23,9 @@ class TestAlertVC: BaseListVC {
|
||||||
"场景:同步成功(写法2)",
|
"场景:同步成功(写法2)",
|
||||||
"场景:同步失败和重试",
|
"场景:同步失败和重试",
|
||||||
"极端场景:短时间内调用了多次同一个弹窗",
|
"极端场景:短时间内调用了多次同一个弹窗",
|
||||||
"极端场景:多个弹窗重叠"]
|
"极端场景:多个弹窗重叠",
|
||||||
|
"测试较长的标题和内容",
|
||||||
|
"测试特别长的标题和内容"]
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||||
|
@ -179,6 +181,24 @@ class TestAlertVC: BaseListVC {
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
|
||||||
f(4)
|
f(4)
|
||||||
}
|
}
|
||||||
|
} else if row == 6 {
|
||||||
|
Alert.push() { (a) in
|
||||||
|
a.update { (vm) in
|
||||||
|
vm.scene = .confirm
|
||||||
|
vm.title = "正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过"
|
||||||
|
vm.message = "正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过"
|
||||||
|
vm.add(action: .default, title: "我知道了", handler: nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if row == 7 {
|
||||||
|
Alert.push() { (a) in
|
||||||
|
a.update { (vm) in
|
||||||
|
vm.scene = .warning
|
||||||
|
vm.title = "正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过"
|
||||||
|
vm.message = "正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过"
|
||||||
|
vm.add(action: .default, title: "我知道了", handler: nil)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,9 @@ class TestToastVC: BaseListVC {
|
||||||
"禁止手势移除",
|
"禁止手势移除",
|
||||||
"组合使用示例",
|
"组合使用示例",
|
||||||
"避免重复发布同一条信息",
|
"避免重复发布同一条信息",
|
||||||
"根据id查找并修改实例"]
|
"根据id查找并修改实例",
|
||||||
|
"测试较长的标题和内容",
|
||||||
|
"测试特别长的标题和内容"]
|
||||||
}
|
}
|
||||||
|
|
||||||
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||||
|
@ -111,6 +113,24 @@ class TestToastVC: BaseListVC {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
} else if row == 9 {
|
||||||
|
Toast.push() { (a) in
|
||||||
|
a.update { (vm) in
|
||||||
|
vm.scene = .warning
|
||||||
|
vm.title = "正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过"
|
||||||
|
vm.message = "正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过"
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if row == 10 {
|
||||||
|
Toast.push() { (a) in
|
||||||
|
a.update { (vm) in
|
||||||
|
vm.scene = .warning
|
||||||
|
vm.title = "正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过"
|
||||||
|
vm.message = "正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过正在同步看到了你撒地方快乐撒的肌肤轮廓啊就是;来的跨省的人格人格离开那地方离开过"
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"repositoryURL": "https://github.com/xaoxuu/Inspire.git",
|
"repositoryURL": "https://github.com/xaoxuu/Inspire.git",
|
||||||
"state": {
|
"state": {
|
||||||
"branch": null,
|
"branch": null,
|
||||||
"revision": "fed13e3530ca38f884d190ea5c7b12b8f3b2a41b",
|
"revision": "cad0c64e6995a06ee3bf3ed7c632ad27c1b8ffb1",
|
||||||
"version": "2.0.0"
|
"version": "2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"repositoryURL": "https://github.com/xaoxuu/Inspire",
|
"repositoryURL": "https://github.com/xaoxuu/Inspire",
|
||||||
"state": {
|
"state": {
|
||||||
"branch": null,
|
"branch": null,
|
||||||
"revision": "fed13e3530ca38f884d190ea5c7b12b8f3b2a41b",
|
"revision": "cad0c64e6995a06ee3bf3ed7c632ad27c1b8ffb1",
|
||||||
"version": "2.0.0"
|
"version": "2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -33,7 +33,7 @@ public extension ProHUD.Configuration {
|
||||||
/// 标题字体
|
/// 标题字体
|
||||||
public var titleFont = UIFont.boldSystemFont(ofSize: 22)
|
public var titleFont = UIFont.boldSystemFont(ofSize: 22)
|
||||||
/// 标题最多行数
|
/// 标题最多行数
|
||||||
public var titleMaxLines = Int(1)
|
public var titleMaxLines = Int(5)
|
||||||
|
|
||||||
/// 加粗字体(如果只有标题或者只有正文,则显示这种字体)
|
/// 加粗字体(如果只有标题或者只有正文,则显示这种字体)
|
||||||
public var boldTextFont = UIFont.boldSystemFont(ofSize: 18)
|
public var boldTextFont = UIFont.boldSystemFont(ofSize: 18)
|
||||||
|
@ -41,7 +41,7 @@ public extension ProHUD.Configuration {
|
||||||
/// 正文字体
|
/// 正文字体
|
||||||
public var bodyFont = UIFont.systemFont(ofSize: 17)
|
public var bodyFont = UIFont.systemFont(ofSize: 17)
|
||||||
/// 正文最多行数
|
/// 正文最多行数
|
||||||
public var bodyMaxLines = Int(5)
|
public var bodyMaxLines = Int(20)
|
||||||
|
|
||||||
// MARK: 按钮样式
|
// MARK: 按钮样式
|
||||||
/// 按钮字体
|
/// 按钮字体
|
||||||
|
|
|
@ -236,7 +236,7 @@ internal extension Alert {
|
||||||
}
|
}
|
||||||
addTouchUpAction(for: btn) { [weak self] in
|
addTouchUpAction(for: btn) { [weak self] in
|
||||||
handler?()
|
handler?()
|
||||||
if btn.tag == UIAlertAction.Style.cancel.rawValue {
|
if btn.tag == UIAlertAction.Style.cancel.rawValue || handler == nil {
|
||||||
self?.pop()
|
self?.pop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,12 +29,12 @@ public extension ProHUD.Configuration {
|
||||||
/// 标题字体
|
/// 标题字体
|
||||||
public var titleFont = UIFont.boldSystemFont(ofSize: 18)
|
public var titleFont = UIFont.boldSystemFont(ofSize: 18)
|
||||||
/// 标题最多行数
|
/// 标题最多行数
|
||||||
public var titleMaxLines = Int(1)
|
public var titleMaxLines = Int(5)
|
||||||
|
|
||||||
/// 正文字体
|
/// 正文字体
|
||||||
public var bodyFont = UIFont.systemFont(ofSize: 16)
|
public var bodyFont = UIFont.systemFont(ofSize: 16)
|
||||||
/// 正文最多行数
|
/// 正文最多行数
|
||||||
public var bodyMaxLines = Int(10)
|
public var bodyMaxLines = Int(20)
|
||||||
|
|
||||||
/// 更新视图
|
/// 更新视图
|
||||||
/// - Parameter callback: 回调代码
|
/// - Parameter callback: 回调代码
|
||||||
|
|
Loading…
Reference in New Issue