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 _buttons
is 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!)
精彩评论