search

Home  >  Q&A  >  body text

IOS swift UITextView自适应问题,求大神指导

textView.bounds.size.height = textView.contentSize.height
会导致原有对textView的上下约束被突破,并且是两头延伸,如何能让textView只向上变大,不向下变大呢,另外有什么方法能让toolBar和textView一起变大和缩小呢?

PHPzPHPz2887 days ago300

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 17:38:05

    You need to modify the frame's
    origin.y=the coordinates of the bottom you want - the height of the text
    and
    size.height=the height of the text..

    Not just size..the meaning of layout frame. .

    reply
    0
  • Cancelreply