So as a little background, I have a ViewController where I display a header label, and a another label for a review, with a lot of text.
I have tried to put a label inside a ScrollView, but as the review copy is different lengths for different products, it's just not simple to make the ScrollView height fit. I was also having a lot of issues making the label appear correctly inside the ScrollView - using constraints just didn't seem to make a difference. After some research, I noticed a lot of people said, just use a UITextView, and set it to not editable. So this is what I did. And it seemed to work. The scrollable textView always fitted the length of my text review. Perfect.
However, the text in the UITextView never appears as how I style it in main.storyboard. In the image below, you can see how the main review text is displaying (small and the colour black). The title on the screen, is how the review text has been styled in main.storyboard.
Why doesn't the review text appear how I styled it and how can I make it the way I want? I'm assuming this is a UITextView issue?
I haven't provided any code here, as I have styled everything in the main.storyboard. But this is how it looks in my main.Storyboard...
I have conformed to UITextViewDelegate and set the delegate to self in ViewDidLoad() - but from what I understand, this is only needed for the editable text, of which I have disabled.
Thanks in advanced, and ask if you need anymore info from me!
CODE RELATING TO THE TEXTVIEW USED ON THE VC:
@IBOutlet weak var filmReviewText: UITextView!
// Mark:- Colour for textView text
var textColour: UIColor = UIColor.whiteColor()
and in the ViewDidLoad()
I put,
filmReviewText.editable = false
filmReviewText.textColor = textColour