简体   繁体   中英

How to add view below textview

I need to add a view below a textview that changes it's height dynamically. In other words my view should be shown when textview reach end of text. If I just add constraint for my view = bottom of screen it will overlap my textview.

Its looks like very easy, but i really stuck on this task

You are already having enough constraint for your view.I feel, You do not need to provide bottom constraint from superview. Your View contains trailing , leading constrains, height and top from the text view. That should be enough. In your case You are forcing view to always be fixed at the bottom. If text view contains large text it will overlap. So remove bottom constraints and it should work fine if text view is dynamically changing height.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM