Commit 3585a10b authored by pete谢兆麟's avatar pete谢兆麟

细节添加

parent eb0cd92a
......@@ -24,6 +24,30 @@ class YHInvitationWithGiftsViewController: YHBaseViewController {
setView()
loadData()
}
override func backItemClick(_ sender: Any) {
let view = YHInvitationWithGiftsShareView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.block = { tag in
self.navigationController?.popViewController()
}
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
}
/// 是否可以返回,包括点击返回和手势返回,默认YES
override func navigationShouldPop() -> Bool {
let view = YHInvitationWithGiftsShareView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.block = { tag in
self.navigationController?.popViewController()
}
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
return false
}
}
extension YHInvitationWithGiftsViewController: UITableViewDelegate, UITableViewDataSource {
......@@ -76,7 +100,6 @@ extension YHInvitationWithGiftsViewController: UITableViewDelegate, UITableViewD
}
extension YHInvitationWithGiftsViewController {
func getData() {
......@@ -117,13 +140,8 @@ extension YHInvitationWithGiftsViewController {
bottomViewForShare = {
let view = YHInvitationWithGiftsShareBottomView()
view.block = { tag in
let view = YHInvitationWithGiftsShareView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.block = { tag in
let vc = YHInvatationShareViewController()
self.navigationController?.pushViewController(vc)
}
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
let vc = YHInvatationShareViewController()
self.navigationController?.pushViewController(vc)
}
return view
}()
......
......@@ -20,6 +20,7 @@ class YHInvitationWithGiftsDetailView: UIView {
var closeButton: UIButton!
var messageLabel: UILabel!
var messageImage: UIImageView!
var bgView: UIView!
override init(frame: CGRect) {
super.init(frame: frame)
......@@ -71,6 +72,18 @@ class YHInvitationWithGiftsDetailView: UIView {
make.left.right.bottom.equalToSuperview()
}
bgView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0xf3f8ff)
return view
}()
topView.addSubview(bgView)
bgView.snp.makeConstraints { make in
make.right.equalTo(-12)
make.top.left.equalTo(12)
make.height.equalTo(29)
}
topImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "invitation_with_gifts_detail_top")
......
......@@ -93,11 +93,11 @@ class YHInvitationWithGiftsShareView: UIView {
@objc func dismiss() {
removeFromSuperview()
block?(0)
}
@objc func share() {
removeFromSuperview()
block?(0)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment