|
@@ -23,6 +23,7 @@ public class PQSelectedOprationView: UIView {
|
|
|
contentView.frame = CGRect(x: 0, y: cScreenHeigth, width: cScreenWidth, height: contentH)
|
|
|
contentView.addCorner(roundingCorners: [.topLeft, .topRight], corner: 11)
|
|
|
cancelBtn.frame = CGRect(x: 0, y: contentH - itemH - cSafeAreaHeight, width: cScreenWidth, height: itemH + cSafeAreaHeight)
|
|
|
+ addSubViews()
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -60,10 +61,10 @@ public class PQSelectedOprationView: UIView {
|
|
|
|
|
|
override public func layoutSubviews() {
|
|
|
super.layoutSubviews()
|
|
|
- addSubViews()
|
|
|
+// addSubViews()
|
|
|
}
|
|
|
|
|
|
- public func addSubViews() {
|
|
|
+ public func addSubViews() {
|
|
|
if (itemList?.count ?? 0) > 0 {
|
|
|
for (index, item) in itemList!.enumerated() {
|
|
|
let normalBtn = UIButton(type: .custom)
|
|
@@ -92,7 +93,7 @@ public class PQSelectedOprationView: UIView {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- class public func showSelectedOprationView(itemList: [String], completeHander: @escaping ((_ sender: UIButton) -> Void)) {
|
|
|
+ class public func showSelectedOprationView(itemList: [String], completeHander: @escaping ((_ sender: UIButton) -> Void)) -> PQSelectedOprationView {
|
|
|
let selectedOprationView: PQSelectedOprationView = PQSelectedOprationView(frame: CGRect(x: 0, y: 0, width: cScreenWidth, height: cScreenHeigth))
|
|
|
selectedOprationView.completeHander = completeHander
|
|
|
selectedOprationView.itemList = itemList
|
|
@@ -102,6 +103,7 @@ public class PQSelectedOprationView: UIView {
|
|
|
selectedOprationView.contentView.frame = CGRect(x: 0, y: cScreenHeigth - contentH, width: cScreenWidth, height: contentH)
|
|
|
}) { _ in
|
|
|
}
|
|
|
+ return selectedOprationView
|
|
|
}
|
|
|
|
|
|
@objc public func btnClick(sender: UIButton) {
|