mardi 14 avril 2015

XCODE/Swift Autolayout ScrollView with dynamic label, textview etc. How set scrollview height based on textview


Vote count:

0




All tutorials regarding scrollview is with colored boxes and no textfields or dynimcally changing elements.


Screenshot of design I have following design, black boxes is pictures, below picture a date and topic, below that a title, and at the bottom I have a textview which gets loaded from a websource. I have disabled scroll on textview, as I want only the scrollview to scroll. So how would be the best way to solve this, so i will be able to scroll to the bottom of the textview, showing me all the text?


My idea is to somehow retrieve the contentheight of the textview after loading contents into it (ViewDidLoad). Then add this to the height of the scrollview deducted from the original height of the textview. But must say, it seems tough for something which i thought would be standard functionality. Any ideas on this?



asked 23 secs ago







XCODE/Swift Autolayout ScrollView with dynamic label, textview etc. How set scrollview height based on textview

Aucun commentaire:

Enregistrer un commentaire