
我添加了
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];if (IOS7_OR_LATER) self.window.tintcolor = [self greenTintcolor];
到我的应用代表的
- (BOol)application:(UIApplication *)application dIDFinishLaunchingWithOptions:(NSDictionary *)launchOptions
它主要有所帮助,但消息框和 *** 作表按钮的颜色仍然是默认的蓝色.
我怎样才能重新着色所有这些按钮呢?
一些截图:
解决方法 由于UIAlertVIEw已弃用,您可以.使用UIAlertController.您可以使用tintcolor属性.
旧
The UIAlertVIEw class is intended to be used as-is and does not
support subclassing. The vIEw hIErarchy for this class is private and
must not be modifIEd.
– 来自Apple Doc
您可以使用tintcolor属性或您可以使用某些自定义库,您可以在cocoacontrols.com上找到它.
总结以上是内存溢出为你收集整理的ios – 更改UIAlertview和UIActionsheet按钮的色调颜色全部内容,希望文章能够帮你解决ios – 更改UIAlertview和UIActionsheet按钮的色调颜色所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)