Commit 1c7b6356 authored by Steven杜宇's avatar Steven杜宇

// 人脉

parent 20802338
...@@ -71,8 +71,9 @@ class YHAddFriendCardCell: UITableViewCell { ...@@ -71,8 +71,9 @@ class YHAddFriendCardCell: UITableViewCell {
}() }()
lazy var headImgV:UIImageView = { lazy var headImgV:UIImageView = {
let view = UIImageView() let view = UIImageView(image: UIImage(named: "people_head_default"))
view.layer.cornerRadius = 23.0 view.layer.cornerRadius = 23.0
view.clipsToBounds = true
return view return view
}() }()
...@@ -165,11 +166,11 @@ class YHAddFriendCardCell: UITableViewCell { ...@@ -165,11 +166,11 @@ class YHAddFriendCardCell: UITableViewCell {
} }
@objc func didIgnoreBtnClicked() { @objc func didIgnoreBtnClicked() {
self.acceptBlock?(true) self.acceptBlock?(false)
} }
@objc func didAcceptBtnClicked() { @objc func didAcceptBtnClicked() {
self.acceptBlock?(false) self.acceptBlock?(true)
} }
func createUI() { func createUI() {
...@@ -265,7 +266,7 @@ class YHAddFriendCardCell: UITableViewCell { ...@@ -265,7 +266,7 @@ class YHAddFriendCardCell: UITableViewCell {
self.secondCardView.snp.makeConstraints { make in self.secondCardView.snp.makeConstraints { make in
make.left.equalTo(self.cardView).offset(5) make.left.equalTo(self.cardView).offset(5)
make.right.equalTo(self.cardView).offset(-5) make.right.equalTo(self.cardView).offset(-5)
make.height.equalTo(50) make.height.equalTo(6)
make.bottom.equalTo(self.thirdCardView).offset(-6) make.bottom.equalTo(self.thirdCardView).offset(-6)
} }
...@@ -273,7 +274,7 @@ class YHAddFriendCardCell: UITableViewCell { ...@@ -273,7 +274,7 @@ class YHAddFriendCardCell: UITableViewCell {
make.left.equalTo(self.cardView).offset(10) make.left.equalTo(self.cardView).offset(10)
make.right.equalTo(self.cardView).offset(-10) make.right.equalTo(self.cardView).offset(-10)
make.bottom.equalToSuperview() make.bottom.equalToSuperview()
make.height.equalTo(50) make.height.equalTo(6)
} }
} }
......
...@@ -43,7 +43,7 @@ class YHFriendRequestView: UIView { ...@@ -43,7 +43,7 @@ class YHFriendRequestView: UIView {
}() }()
lazy var headImgV:UIImageView = { lazy var headImgV:UIImageView = {
let view = UIImageView() let view = UIImageView(image: UIImage(named: "people_head_default"))
view.layer.cornerRadius = 23.0 view.layer.cornerRadius = 23.0
view.clipsToBounds = true view.clipsToBounds = true
return view return view
...@@ -159,7 +159,7 @@ class YHFriendRequestView: UIView { ...@@ -159,7 +159,7 @@ class YHFriendRequestView: UIView {
@objc func didSendBtnClicked() { @objc func didSendBtnClicked() {
if isEmptyString(self.textView.text) { if isEmptyString(self.textView.text) {
YHHUD.flash(message: "请输入好友申请信息") YHHUD.flash(message: "请输入发送申请信息")
return return
} }
self.sendBlock?(self.textView.text) self.sendBlock?(self.textView.text)
...@@ -251,7 +251,7 @@ class YHFriendRequestView: UIView { ...@@ -251,7 +251,7 @@ class YHFriendRequestView: UIView {
self.placeHolderLabel.snp.makeConstraints { make in self.placeHolderLabel.snp.makeConstraints { make in
make.top.equalTo(self.textView.snp.top).offset(7) make.top.equalTo(self.textView.snp.top).offset(7)
make.left.equalTo(self.textView.snp.left).offset(4) make.left.equalTo(self.textView.snp.left).offset(7)
make.right.equalTo(self.textView) make.right.equalTo(self.textView)
} }
...@@ -285,7 +285,7 @@ class YHFriendRequestView: UIView { ...@@ -285,7 +285,7 @@ class YHFriendRequestView: UIView {
guard let keyboardFrame = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as AnyObject).cgRectValue else {return } guard let keyboardFrame = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as AnyObject).cgRectValue else {return }
let isKeyboardShow = notification.name == UIResponder.keyboardWillShowNotification let isKeyboardShow = notification.name == UIResponder.keyboardWillShowNotification
let bottomMargin = (isKeyboardShow ? keyboardFrame.height+10 : (KScreenHeight-YHFriendRequestView.cardHeight)/2.0) let bottomMargin = (isKeyboardShow ? keyboardFrame.height+20 : (KScreenHeight-YHFriendRequestView.cardHeight)/2.0)
self.cardView.snp.updateConstraints { make in self.cardView.snp.updateConstraints { make in
make.bottom.equalToSuperview().offset(-bottomMargin) make.bottom.equalToSuperview().offset(-bottomMargin)
} }
......
...@@ -25,7 +25,7 @@ class YHMyFriendsCell: UITableViewCell { ...@@ -25,7 +25,7 @@ class YHMyFriendsCell: UITableViewCell {
} }
lazy var headImgV:UIImageView = { lazy var headImgV:UIImageView = {
let view = UIImageView() let view = UIImageView(image: UIImage(named: "people_head_default"))
view.layer.cornerRadius = 23.0 view.layer.cornerRadius = 23.0
view.clipsToBounds = true view.clipsToBounds = true
return view return view
......
...@@ -208,16 +208,16 @@ class YHMyNameCardAvatarInfoCell: UITableViewCell { ...@@ -208,16 +208,16 @@ class YHMyNameCardAvatarInfoCell: UITableViewCell {
} }
self.nameTextView.snp.makeConstraints { make in self.nameTextView.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(10)
make.right.equalTo(-16) make.right.equalTo(-16)
make.top.equalTo(headWidth/2.0+10.0) make.top.equalTo(headWidth/2.0)
} }
self.professionalLabel.snp.makeConstraints { make in self.professionalLabel.snp.makeConstraints { make in
make.left.equalTo(16) make.left.equalTo(16)
make.right.equalTo(-16) make.right.equalTo(-16)
// make.height.equalTo(20) // make.height.equalTo(20)
make.top.equalTo(self.nameTextView.snp.bottom).offset(8) make.top.equalTo(self.nameTextView.snp.bottom).offset(0)
} }
self.detailLabel.snp.makeConstraints { make in self.detailLabel.snp.makeConstraints { make in
......
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