From d37b75ae2563889d6491c102b00a2a3614628b58 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Wed, 24 Jun 2015 17:16:09 +0800 Subject: [PATCH] fix: check if isFirstTimeBeenAddAsSubview to makeUI --- .../ConversationMore/ConversationMoreView.swift | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Yep/Views/ConversationMore/ConversationMoreView.swift b/Yep/Views/ConversationMore/ConversationMoreView.swift index 809efb54..90bb19f1 100644 --- a/Yep/Views/ConversationMore/ConversationMoreView.swift +++ b/Yep/Views/ConversationMore/ConversationMoreView.swift @@ -18,6 +18,7 @@ class ConversationMoreDetailCell: UITableViewCell { layoutMargins = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20) textLabel?.textColor = UIColor.darkGrayColor() + textLabel?.font = UIFont(name: "Helvetica-Light", size: 18)! } required init(coder aDecoder: NSCoder) { @@ -33,6 +34,7 @@ class ConversationMoreCheckCell: UITableViewCell { layoutMargins = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20) textLabel?.textColor = UIColor.darkGrayColor() + textLabel?.font = UIFont(name: "Helvetica-Light", size: 18)! makeUI() } @@ -188,10 +190,19 @@ class ConversationMoreView: UIView { }) } + var isFirstTimeBeenAddAsSubview = true + override func didMoveToSuperview() { super.didMoveToSuperview() - makeUI() + if isFirstTimeBeenAddAsSubview { + isFirstTimeBeenAddAsSubview = false + + makeUI() + + let tap = UITapGestureRecognizer(target: self, action: "hide") + containerView.addGestureRecognizer(tap) + } } func makeUI() {