@@ -20,21 +20,23 @@ class AltViewController: UIViewController {
2020
2121 textView. textContainer. maximumNumberOfLines = 0
2222 textView. textContainer. lineBreakMode = . byWordWrapping
23- textView. font = . preferredFont( forTextStyle: . callout)
2423 textView. isScrollEnabled = true
2524 textView. backgroundColor = . clear
2625 textView. isOpaque = false
2726 textView. isEditable = false
28- textView. tintColor = . white
2927 textView. textContainerInset = UIEdgeInsets ( top: 12 , left: 8 , bottom: 8 , right: 8 )
3028 textView. contentInsetAdjustmentBehavior = . always
3129 textView. verticalScrollIndicatorInsets. bottom = 4
3230
3331 return textView
3432 } ( )
3533
36- init ( alt: String , sourceView: UIView ? ) {
37- textView. text = alt
34+ init ( alt: String , language: String ? , sourceView: UIView ? ) {
35+ textView. attributedText = NSAttributedString ( string: alt, attributes: [
36+ . languageIdentifier: " " ,
37+ . foregroundColor: UIColor . white,
38+ . font: UIFont . preferredFont ( forTextStyle: . callout) ,
39+ ] )
3840 super. init ( nibName: nil , bundle: nil )
3941 self . modalPresentationStyle = . popover
4042 self . popoverPresentationController? . delegate = self
0 commit comments