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"] objectAtIndex: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!)