ios – UIAabel在UIActivityViewController中的UIAppearance

ios – UIAabel在UIActivityViewController中的UIAppearance,第1张

概述我有这个代码,当它们出现在UIAlertControllers中时会改变UILabel的外观: UILabel *appearanceLabel = [UILabel appearanceWhenContainedInInstancesOfClasses:@[[UIAlertController class]]]; [appearanceLabel setAppearanceFont:kF 我有这个代码,当它们出现在UIAlertControllers中时会改变UILabel的外观:

UILabel *appearanceLabel = [UILabel appearanceWhenContainedInInstancesOfClasses:@[[UIAlertController class]]];    [appearanceLabel setAppearanceFont:kFontRegular(18)];

但这也会影响UIActivityVIEwControllers中出现的UILabel.

如何在UIActivityVIEwController中排除UILabels?

解决方法 根据您的情况,您可以将自己的UIAlertController子类化并使用,而不是尝试设置/取消设置外观

UILabel *appearanceLabel = [UILabel appearanceWhenContainedInInstancesOfClasses:@[[MyAlertController class]]];    [appearanceLabel setAppearanceFont:kFontRegular(18)];

然后当 *** 作表打开时,它将不是您的子类,因此该规则将不适用.

总结

以上是内存溢出为你收集整理的ios – UIAabel在UIActivityViewController中的UIAppearance全部内容,希望文章能够帮你解决ios – UIAabel在UIActivityViewController中的UIAppearance所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1070613.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-26
下一篇2022-05-26

发表评论

登录后才能评论

评论列表(0条)

    保存