I just want to resize a UITextView character. you can still attach a string, but I'm trying to resize: impossible. When I searched the forum, I found that some people selected Editable
and canceled it. Other people got it by choosing Selectable
View in the properties. Then I tried this way ... in no way changed. Just plain text.
import UIKit
@objc(TextControllerSwift) class TextControllerSwift: UIViewController {
var selectedMovie: String?
var textPlaying: String?
@IBOutlet weak var textMuseum: UITextView!
override func viewDidLoad() {
super.viewDidLoad()
realPlay()
}
func playText(textSelect: String) {
textPlaying = textSelect
}
func realPlay(){
var textRoom: String?
let path = NSBundle.mainBundle().pathForResource(textPlaying, ofType:"txt")
if (path != nil){
do {
textRoom= try String(contentsOfFile: path!, encoding: NSUTF8StringEncoding)
}
catch {}
textMuseum.editable=true
textMuseum.selectable=true
textMuseum!.text=""
textMuseum.font = UIFont(name: "Arial-Unicode", size: 50)
textMuseum.text=textMuseum.text.stringByAppendingString(String(textRoom!))
}}}
hmmm where am i wrong? because I changed the font of textMuseum. Should I free some Costraint on a UITextView object set to StoryBoard? also when deleting Editable
, the Selectable
result is the same. why?
Thank you for any help.
EDIT:
Git - , . , "testo" uisegmented .
https://github.com/sanxius/TryText.git