Skip to content

Commit 9624820

Browse files
committed
Update PopupController.swift
1 parent e93363b commit 9624820

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

Sources/UIKit/Popup/Controllers/PopupController.swift

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,23 @@
11
//
22
// PopupController.swift
3-
// HTComponents
3+
// FXViewKit
44
//
55
// Created by mac on 2021/6/10.
66
//
77

88
import UIKit
9-
import SnapKit
109

11-
@objc(HTPopupViewProtocol)
10+
@objc(FXPopupViewProtocol)
1211
public protocol PopupViewProtocol: NSObjectProtocol {
1312
weak var popupControllerDelegate: PopupControllerProtocol? { set get }
1413
}
1514

16-
@objc(HTPopupControllerProtocol)
15+
@objc(FXPopupControllerProtocol)
1716
public protocol PopupControllerProtocol: NSObjectProtocol {
1817
func dismiss()
1918
}
2019

21-
@objc(HTPopupController)
20+
@objc(FXPopupController)
2221
@objcMembers
2322
open class PopupController: UIViewController, PopupControllerProtocol {
2423

@@ -40,12 +39,15 @@ open class PopupController: UIViewController, PopupControllerProtocol {
4039
super.viewDidLoad()
4140

4241
view.backgroundColor = UIColor.black.withAlphaComponent(0.3)
42+
self.customView.translatesAutoresizingMaskIntoConstraints = false
4343

4444
view.addSubview(self.customView)
45-
self.customView.snp.makeConstraints { make in
46-
make.center.equalToSuperview()
47-
make.width.height.lessThanOrEqualToSuperview()
48-
}
45+
NSLayoutConstraint.activate([
46+
customView.centerYAnchor.constraint(equalTo: view.centerYAnchor),
47+
customView.centerXAnchor.constraint(equalTo: view.centerXAnchor),
48+
customView.widthAnchor.constraint(lessThanOrEqualTo: view.widthAnchor),
49+
customView.heightAnchor.constraint(lessThanOrEqualTo: view.heightAnchor),
50+
])
4951

5052
}
5153

0 commit comments

Comments
 (0)