@@ -30,12 +30,8 @@ class EditorDemoController: UIViewController {
3030
3131 fileprivate( set) lazy var editorView : Aztec . EditorView = {
3232 let defaultHTMLFont : UIFont
33-
34- if #available( iOS 11 , * ) {
35- defaultHTMLFont = UIFontMetrics . default. scaledFont ( for: Constants . defaultContentFont)
36- } else {
37- defaultHTMLFont = Constants . defaultContentFont
38- }
33+
34+ defaultHTMLFont = UIFontMetrics . default. scaledFont ( for: Constants . defaultContentFont)
3935
4036 let editorView = Aztec . EditorView (
4137 defaultFont: Constants . defaultContentFont,
@@ -63,10 +59,8 @@ class EditorDemoController: UIViewController {
6359 textView. textAttachmentDelegate = self
6460 textView. accessibilityIdentifier = " richContentView "
6561 textView. clipsToBounds = false
66- if #available( iOS 11 , * ) {
67- textView. smartDashesType = . no
68- textView. smartQuotesType = . no
69- }
62+ textView. smartDashesType = . no
63+ textView. smartQuotesType = . no
7064 }
7165
7266 private func setupHTMLTextView( _ textView: UITextView ) {
@@ -79,14 +73,10 @@ class EditorDemoController: UIViewController {
7973 textView. autocorrectionType = . no
8074 textView. autocapitalizationType = . none
8175 textView. clipsToBounds = false
82- if #available( iOS 10 , * ) {
83- textView. adjustsFontForContentSizeCategory = true
84- }
85-
86- if #available( iOS 11 , * ) {
87- textView. smartDashesType = . no
88- textView. smartQuotesType = . no
89- }
76+ textView. adjustsFontForContentSizeCategory = true
77+
78+ textView. smartDashesType = . no
79+ textView. smartQuotesType = . no
9080 }
9181
9282 fileprivate( set) lazy var titleTextView : UITextView = {
@@ -249,9 +239,8 @@ class EditorDemoController: UIViewController {
249239 func updateScrollInsets( ) {
250240 var scrollInsets = editorView. contentInset
251241 var rightMargin = ( view. frame. maxX - editorView. frame. maxX)
252- if #available( iOS 11 . 0 , * ) {
253- rightMargin -= view. safeAreaInsets. right
254- }
242+ rightMargin -= view. safeAreaInsets. right
243+
255244 scrollInsets. right = - rightMargin
256245 editorView. scrollIndicatorInsets = scrollInsets
257246 }
@@ -499,6 +488,10 @@ extension EditorDemoController : UITextViewDelegate {
499488 return true
500489 }
501490
491+ func textView( _ textView: UITextView , shouldInteractWith URL: URL , in characterRange: NSRange , interaction: UITextItemInteraction ) -> Bool {
492+ return false
493+ }
494+
502495 func scrollViewDidScroll( _ scrollView: UIScrollView ) {
503496 updateTitlePosition ( )
504497 }
@@ -798,9 +791,7 @@ extension EditorDemoController {
798791 textField. clearButtonMode = UITextField . ViewMode. always;
799792 textField. placeholder = NSLocalizedString ( " URL " , comment: " URL text field placeholder " ) ;
800793 textField. keyboardType = . URL
801- if #available( iOS 10 , * ) {
802- textField. textContentType = . URL
803- }
794+ textField. textContentType = . URL
804795 textField. text = urlToUse? . absoluteString
805796
806797 textField. addTarget ( self ,
0 commit comments