How about this custom uialertview?

this is the code that I took the form .....

  - (void)willPresentAlertView:(UIAlertView *)alertView
    {
        [[[alertView subviews] objectAtIndex:2] setBackgroundColor:[UIColor colorWithRed:0.5 green:0.0f blue:0.0f alpha:1.0f]];
    }

    - (void) presentSheet
    {
        UIAlertView *baseAlert = [[UIAlertView alloc] 
                                  initWithTitle:@"Alert" message:@"This alert allows the user to choose between a 'safe' and a 'deadly' choice, indicated by button color.\n\n\n\n" 
                                  delegate:self cancelButtonTitle:nil
                                  otherButtonTitles:@"Deadly!", @"Safe", nil];
UITextField *txtFld = [[UITextField alloc] initWithFrame:CGRectMake(60,10,240,31)];
[txtFld setDelegate:self];
[txtFld setBackgroundColor:[UIColor clearColor]];
[baseAlert addSubView:txtFld];
[txtFld release];
        [baseAlert show];
    }

my question is: if it is allowed to change the basic look and feel of the apple provided by UIControls, because I see no reason why the apple should not allow this type of setting.

0
source share
2 answers

The alert values ​​have long been standardized for the same reason that such as fire extinguishers and safety signs are standardized, i.e. you don’t want people to be able to figure out a new interface while something is wrong.

, - , . ? : ", , , , !" , , , .

, -. , API Apple.

+7

, Apple subviews, , , . , Tech Tech Talk, - , , , .

+3

All Articles