开发者

Adding Image to UIActionSheet UIButton and App Approval

I want to submit an iPhone application, and I am concerned about the following line of code which add an Image to the UIActionSheet Button:

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@""
                                                         delegate:self
                                                cancelButtonTitle:nil
                                           destructiveButtonTitle:nil
                                                otherButtonTitles:nil];
[actionSheet addButtonWithTitle:@"Button"];

[[[action valueForKey:@"_buttons"] object开发者_如何学JAVAAtIndex:0] setImage:[UIImage imageNamed:@"yourImage.png"] forState:UIControlStateNormal];

does that compromise any of apple app sumbition rules? is it legal? please tell me if so.

Thanks.


It is not legal, since _buttonsis not a public API.

(I would say however that it would pass Apple's review since you are using KVC and they have no way to know that this is a private call. Still, play safe and don't use it!)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜