2016-04-29 20 views

回答

2

您需要使用Text Alignment.從文檔:

var textAlignment: NSTextAlignment 

您可能要硬設置UITextView typing attributes. 話又說回來,如果你的問題不在於它不再是文本的對齊到左邊,而是整個事情變得稍微縮進,你的問題可能與Text Container Inset.你可以閱讀更多關於插圖here

textView.textContainerInset = UIEdgeInsets(top: 8, left: 8, bottom: 8, right: 8); 
+1

Thanks Max!這確實是UIEdgeInsets的一個問題。 – debbiedowner

相關問題