From bd4533fb33c6c978d7c1c4cdb424cd8a805d50e2 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Wed, 11 Nov 2015 12:59:03 +0800 Subject: [PATCH] clean introduction placeholder before first time set it --- Podfile.lock | 2 +- .../EditProfileMoreInfo/EditProfileMoreInfoCell.swift | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Podfile.lock b/Podfile.lock index 6a3b9257..2c1d94cc 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -53,7 +53,7 @@ DEPENDENCIES: EXTERNAL SOURCES: MZFayeClient: - :path: "../CatchLib-iOS/MZFayeClient/" + :path: ../CatchLib-iOS/MZFayeClient/ SPEC CHECKSUMS: 1PasswordExtension: 9f471645d378283cb88c6d4bf502e4381a42c0ad diff --git a/Yep/Views/Cells/EditProfileMoreInfo/EditProfileMoreInfoCell.swift b/Yep/Views/Cells/EditProfileMoreInfo/EditProfileMoreInfoCell.swift index b52c3ac1..97ac122f 100644 --- a/Yep/Views/Cells/EditProfileMoreInfo/EditProfileMoreInfoCell.swift +++ b/Yep/Views/Cells/EditProfileMoreInfo/EditProfileMoreInfoCell.swift @@ -38,6 +38,16 @@ class EditProfileMoreInfoCell: UITableViewCell { extension EditProfileMoreInfoCell: UITextViewDelegate { + func textViewShouldBeginEditing(textView: UITextView) -> Bool { + + // 初次设置前,清空 placeholder + if YepUserDefaults.introduction.value == nil { + textView.text = "" + } + + return true + } + func textViewDidChange(textView: UITextView) { infoTextViewIsDirtyAction?()