Browse Source

显示时 弹出 键盘

jsonwang 3 years ago
parent
commit
62b94292ec
1 changed files with 8 additions and 2 deletions
  1. 8 2
      BFFramework/Classes/Stuckpoint/View/PQEditPublicTitleView.swift

+ 8 - 2
BFFramework/Classes/Stuckpoint/View/PQEditPublicTitleView.swift

@@ -35,7 +35,7 @@ class PQEditPublicTitleView: UIView {
         inputTV.backgroundColor = .clear
         inputTV.textColor = .black
         inputTV.maxTextLength = 30
-        inputTV.placeHolderDefultPoint = .zero
+        inputTV.placeHolderDefultPoint = CGPoint(x: 5, y: 0)
         inputTV.tintColor = UIColor.hexColor(hexadecimal: PQBFConfig.shared.styleColor.rawValue)
         inputTV.placeHolder = "我见过你眼中的春与秋,胜过我见过的所有山川河流"
         inputTV.showsVerticalScrollIndicator = false
@@ -112,7 +112,7 @@ class PQEditPublicTitleView: UIView {
 
         backView.addSubview(inputBgView)
         inputBgView.addSubview(inputTV)
-//        inputTV.becomeFirstResponder()
+
         inputBgView.addSubview(confirmBtn)
 
         backView.addSubview(titleCollectionView)
@@ -183,6 +183,12 @@ class PQEditPublicTitleView: UIView {
             viewIsHiddenCallBack!()
         }
     }
+    
+    //显示界面
+    func show() {
+        isHidden = false
+        inputTV.becomeFirstResponder()
+    }
 }
 
 extension PQEditPublicTitleView: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, UIScrollViewDelegate {