Uses subviews in Alert undocumented

I asked a similar question here and got some answers, so first of all, sorry for contacting you again.

But this time I have an argument. First I will show my piece of code

- (void) showTheAlert{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Hey!" message:@"?" delegate:self cancelButtonTitle:nil otherButtonTitles:@"Yes",@"No",@"Don't know eaxactly.",nil];
    [alertView setTag:101];
    [alertView show];
}

- (void)willPresentAlertView:(UIAlertView *)alertView{
    if(alertView.tag == 101){
        [[[alertView subviews] objectAtIndex:2] setBackgroundColor:[UIColor colorWithRed:0.5 green:0.0f blue:0.0f alpha:0.5f]];
        [[[alertView subviews] objectAtIndex:3] setBackgroundColor:[UIColor colorWithRed:0.0 green:0.5f blue:0.0f alpha:0.5f]];
    }

}

And my last warning looks like

enter image description here

Now my confusion is that it is [alertView subviews]not documented, as some people say, but alertview is a subclass UIViewthat has a property called subviews.

Therefore, I use the documentary property of the superclass, which is definitely allowed.

, ? ( , - , , api. alertview.)

+2
3

" iPhone" " " , :

, , . - ; . , , , , . , , , (. " " " " ). ​​

, , . , , ., "", , , isnt .

, :

  • .

  • , , , .

  • , , , , (, , ).

  • .

, , ( , ). Apple ( , , ), .

, Apple - . . , , iPhone OS 3.0, , - subviews , . Apple iPhone OS 3.0 ( ).

- , , - . , , , , , .

+4

iPhone iPhone :

, , . > , , , > . , , :

  • , . , ( "" " " ).

  • . , , , , ( " " ).

  • . , , , ​​ , . , , , , .

, , . .

+6

, UIAlertView - -. -, iPhone , ", -, , , .

, , - , , .

, UIActionSheet, ?

+3

All Articles