![](/img/trans.png)
[英]changing Font-size of UIAlertAction's button title of UIAlertController using Swift in iOS
[英]NSMutableAttributedString as UIAlertAction's title - Swift
是否可以將NSMutableAttributedString設置為AlertAction的標題? 我的目標是在UIAlertAction標題中可視化具有良好設計的數學表達式。
let action = UIAlertAction(title: myNSMutableAttributedString, style: UIAlertActionStyle.default) {(result : UIAlertAction) -> Void in
}
先謝謝您的幫助。
在不訪問私有API的情況下, 無法將NSAttributedString
用作UIAlertAction
的標題,因為將attributedTitle
設置為屬性字符串的方法在這里不起作用( 有關此問題的詳細信息,請參閱此問題 )。
我將為此創建一個自定義類或使用警報庫。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.