扫码关注官方订阅号
现在添加到action sheet的title由于过长,会自己缩小字体大小,那么如何统一字体大小呢?
走同样的路,发现不同的人生
可以试试在 UIActionSheet 的回调 willPresentActionSheet 里遍历 subviews 来做你想要的更改。(不建议这样)。
UIActionSheet 已经被废弃了,如果你的 APP 是 iOS 8 以上的话, 可以试试 UIAlertController.
利用 runtime 在 + (void)load 的时候 method_exchangeImplementations更改初始化方法。
+ (void)load
method_exchangeImplementations
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
可以试试在 UIActionSheet 的回调 willPresentActionSheet 里遍历 subviews 来做你想要的更改。(不建议这样)。
UIActionSheet 已经被废弃了,如果你的 APP 是 iOS 8 以上的话, 可以试试 UIAlertController.
利用 runtime 在
+ (void)load
的时候method_exchangeImplementations
更改初始化方法。