2017-04-21から1日間の記事一覧
自動的に文字の大きさを設定してくれる。フォントを対応するタイプを指定すれば良い。 UIFont.preferredFont(forTextStyle: .body) ストーリボードでもできる。コンテンツサイズの変更は次の通知を受ければ解る。 Notification.Name.UIContentSizeCategoryDi…
contentSizeをオブザーブして textView.addObserver(self, forKeyPath: "contentSize", options: .new, context: nil) contentSizeに変化があれば、中身を調節する。 override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NS…