Thanks for your help. I put this into my code and now my text doesnt display at all. I am brand new at this and am trying to learn and thought this would be something that I could do to make one of my practice excercises have a little more meaning for myself and look better.
my UITextView name is myView and my content string is myString which I am getting from a random number generator hitting against an array.
is "a' a brand new UITextView that is being added to my page? If I had one set up already "myView" can i just use that one? So here is what I have:
myString = movies?[randomMovies]
let a = UITextView(frame: CGRect(x: 0, y: 0, width: 300, height: 300))
let style = NSMutableParagraphStyle()
style.alignment = .center
let text = NSAttributedString(string: myString!,
attributes: [NSParagraphStyleAttributeName:style])
a.attributedText = text
//myView.text = myString
Thanks