iphone – 这个黑客会让苹果大发雷霆吗? (拒绝我的应用程序吗?)

iphone – 这个黑客会让苹果大发雷霆吗? (拒绝我的应用程序吗?),第1张

概述我从这里获取了这段代码 Changing the background color of a UIAlertView? UIAlertView *theAlert = [[[UIAlertView alloc] initWithTitle:@"Atention" message: @"YOUR MESSAGE HERE", nil) delegate:nil cancelButtonT 我从这里获取了这段代码

Changing the background color of a UIAlertView?

UIAlertVIEw *theAlert = [[[UIAlertVIEw alloc] initWithTitle:@"Atention"   message: @"YOUR MESSAGE HERE",nil)   delegate:nil cancelbuttonTitle:@"OK" otherbuttonTitles:nil] autorelease];   [theAlert show];   UILabel *theTitle = [theAlert valueForKey:@"_TitleLabel"];   [theTitle setTextcolor:[UIcolor redcolor]];   UILabel *theBody = [theAlert valueForKey:@"_bodyTextLabel"];   [theBody setTextcolor:[UIcolor bluecolor]];   UIImage *theImage = [UIImage imagenamed:@"Background.png"];       theImage = [theImage stretchableImageWithleftCapWIDth:16 topCapHeight:16];   CGSize theSize = [theAlert frame].size;   UIGraphicsBeginImageContext(theSize);       [theImage drawInRect:CGRectMake(0,theSize.wIDth,theSize.height)];       theImage = UIGraphicsGetimageFromCurrentimageContext();       UIGraphicsEndImageContext();   [[theAlert layer] setContents:[theImage CGImage]];

由oxigen发布的.

我不太确定我应该在我的应用程序中使用此代码.苹果会不会有任何关于这个黑客的问题(他们会拒绝这个应用吗?)

解决方法 下划线作为您正在访问的属性的前缀(_TitleLabel,_bodyTextLabel)清楚地表明这些是私有属性,不应该被修改. Apple最近开始扫描所有提交的二进制文件以访问私有方法和属性,这些值在您的应用程序中自行应该足以让您被拒绝.使用私有API,拒绝或拒绝是绝对不是一个好主意,因为它们通常是私有的,并且可能会因未来的 *** 作系统更新而破坏您的应用程序.

此外,您通过更改警报颜色违反了iPhone Human Interface Guidelines:

You can specify the text,the number
of buttons,and the button contents in
an alert,but you can’t customize the
background appearance of the alert
itself.

再次,从iPhone Human Interface Guidelines:

Because users are accustomed to the appearance and behavior of these vIEws,it’s important to use them consistently and correctly in your application.

总结

以上是内存溢出为你收集整理的iphone – 这个黑客会让苹果大发雷霆吗? (拒绝我的应用程序吗?)全部内容,希望文章能够帮你解决iphone – 这个黑客会让苹果大发雷霆吗? (拒绝我的应用程序吗?)所遇到的程序开发问题。

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

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

原文地址: http://outofmemory.cn/web/1033844.html

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

发表评论

登录后才能评论

评论列表(0条)

保存