@@ -167,12 +167,23 @@ class EditorDemoController: UIViewController {
167167
168168 edgesForExtendedLayout = UIRectEdge ( )
169169 navigationController? . navigationBar. isTranslucent = false
170-
171- view. backgroundColor = . white
172170 view. addSubview ( editorView)
173171 view. addSubview ( titleTextView)
174172 view. addSubview ( titlePlaceholderLabel)
175173 view. addSubview ( separatorView)
174+ // color setup
175+ if #available( iOS 13 . 0 , * ) {
176+ view. backgroundColor = UIColor . systemBackground
177+ titleTextView. textColor = UIColor . label
178+ editorView. htmlTextView. textColor = UIColor . label
179+ editorView. richTextView. textColor = UIColor . label
180+ editorView. richTextView. blockquoteBackgroundColor = UIColor . tertiarySystemBackground
181+ editorView. richTextView. preBackgroundColor = UIColor . tertiarySystemBackground
182+ var attributes = editorView. richTextView. linkTextAttributes
183+ attributes ? [ . foregroundColor] = UIColor . link
184+ } else {
185+ view. backgroundColor = UIColor . white
186+ }
176187 //Don't allow scroll while the constraints are being setup and text set
177188 editorView. isScrollEnabled = false
178189 configureConstraints ( )
@@ -940,11 +951,20 @@ extension EditorDemoController {
940951
941952 let toolbar = Aztec . FormatBar ( )
942953
943- toolbar. tintColor = . gray
944- toolbar. highlightedTintColor = . blue
945- toolbar. selectedTintColor = view. tintColor
946- toolbar. disabledTintColor = . lightGray
947- toolbar. dividerTintColor = . gray
954+ if #available( iOS 13 . 0 , * ) {
955+ toolbar. backgroundColor = UIColor . systemGroupedBackground
956+ toolbar. tintColor = UIColor . secondaryLabel
957+ toolbar. highlightedTintColor = UIColor . systemBlue
958+ toolbar. selectedTintColor = UIColor . systemBlue
959+ toolbar. disabledTintColor = . systemGray4
960+ toolbar. dividerTintColor = UIColor . separator
961+ } else {
962+ toolbar. tintColor = . gray
963+ toolbar. highlightedTintColor = . blue
964+ toolbar. selectedTintColor = view. tintColor
965+ toolbar. disabledTintColor = . lightGray
966+ toolbar. dividerTintColor = . gray
967+ }
948968
949969 toolbar. overflowToggleIcon = Gridicon . iconOfType ( . ellipsis)
950970 toolbar. frame = CGRect ( x: 0 , y: 0 , width: view. frame. width, height: 44.0 )
0 commit comments