Ios Light UIAlertView/UIActionView自定义
这种类型的定制会被认为是应用商店安全的吗Ios Light UIAlertView/UIActionView自定义,ios,iphone,xcode,Ios,Iphone,Xcode,这种类型的定制会被认为是应用商店安全的吗 UIColor *veBlueColor = [UIColor colorWithRed:3.0/255.0 green:147.0/255.0 blue:215.0/255.0 alpha:1]; UIColor *veRedColor = [UIColor colorWithRed:242.0/255.0 green:93.0/255.0 blue:69.0/255.0 alpha:1]; for (UIView *subview in actio
UIColor *veBlueColor = [UIColor colorWithRed:3.0/255.0 green:147.0/255.0 blue:215.0/255.0 alpha:1];
UIColor *veRedColor = [UIColor colorWithRed:242.0/255.0 green:93.0/255.0 blue:69.0/255.0 alpha:1];
for (UIView *subview in actionSheet.subviews) {
if ([subview isKindOfClass:[UIButton class]]) {
UIButton *button = (UIButton*)subview;
UIColor *buttonColor = [button titleColorForState:UIControlStateNormal];
NSString *buttonColorString = [buttonColor description];
UIColor *destructiveColor = [UIColor colorWithRed:0.992157 green:0.278431 blue:0.168627 alpha:1];
NSString *destructiveColorString = [destructiveColor description];
bool isDestructiveButton = ([buttonColorString isEqual:destructiveColorString]?YES:NO);
if (!isDestructiveButton) {
[button setTitleColor:veBlueColor forState:UIControlStateNormal];
}
else {
[button setTitleColor:veRedColor forState:UIControlStateNormal];
}
}
}
我已经阅读了人机界面指南,但总有一些“灰色地带”,谷歌搜索结果显示,不少人声称他们的应用程序获得了苹果公司明确不允许的定制批准
所以我的问题是,你在“轻”定制方面有什么经验 不,我认为这不安全。Apple文档明确指出:“UIActionSheet不是设计为子类的,也不应该向其层次结构中添加视图。如果您需要提供比UIActionSheet API提供的定制更多的工作表,您可以创建自己的工作表,并使用presentViewController:animated:completion:”以模式显示它 在本例中,您没有添加子视图,但实际上您正在检索已经存在的子视图并对其进行自定义-从苹果的角度来看,我认为这是非常类似的
如果UIActionSheet API对您的需求限制太大,我建议您创建自己的ActionSheet。(我建议您看看Git Hub,因为可能有适合您的不同解决方案)。Thanx,听起来很合理。在任何指导方针或建议中,不同的解释可能会有所不同,但我会选择“安全总比后悔好”