views:

71

answers:

1

I'm using UITextView to display a text read from XML file. On click of a button, it will read next entry from XML file and replaces text in text view accordingly. Its working fine. But the trouble is that, some times, the text starts at 0,0 location in text view and some times, its leaving some space at the top of text view and displaying text. How can I force text to align to the top of text view. Also how can I make text view to leave some padding at the top?

A: 

I have something similar with scrollable images loading based on user input, which may or may not help. Every time the user changes the image I call:
[YourTextView setContentOffset:CGPointZero];

It might help reset the positioning of the text view.

mjdth
The other thing I wanted to ask was are you sure that there isn't just a blank line at the top of some of your strings imported from your XML?
mjdth