how can i increase the height of an inputAccessoryView

前端 未结 2 1956
长发绾君心
长发绾君心 2021-01-31 11:25

I have spent several days on this with no solution in sight.

I have an inputAccessoryView which consists of a UIView containing a textV

2条回答
  •  庸人自扰
    2021-01-31 11:36

    Fast forward to 2020, you can just do the following, everything else the same as in maxkonovalov's answer

    override var intrinsicContentSize: CGSize {
        return .zero
    }
    
    // MARK: UITextViewDelegate
    
    func textViewDidChange(_ textView: UITextView) {
        sizeToFit()
    }
    

提交回复
热议问题