Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 538949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:05:07+00:00 2026-05-13T10:05:07+00:00

I have asked a similar question here and got some answers, so first of

  • 0

I have asked a similar question here and got some answers, so first of all sorry for making you people bother once again.

But I have an argument this time. 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 final alert looks like

enter image description here

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

So I am using the documented property of a superclass which is definitely allowed.

So if this alertview may cause rejection of my app or not? ( I don’t think apple will have any base to say I am using the undocumented or a private api. The look and feel is also alike to alertview.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T10:05:07+00:00Added an answer on May 13, 2026 at 10:05 am

    To follow on Henrik’s reply, in the iPhone Human Interface Guidelines section “Designing an Alert”, they say the following:

    Although you can choose the number of
    buttons to place in an alert, a
    two-button alert is often the most
    useful, because it is easiest for
    users to choose between two
    alternatives. It is rarely a good idea
    to display an alert with a single
    button because such an alert cannot
    give users any control over the
    situation; instead, it can only
    display information and provide a
    dismiss button. An alert that contains
    three or more buttons is significantly
    more complex than a two-button alert,
    and should be avoided if possible.
    In
    fact, if you find that you need to
    offer users more than two choices, you
    should consider using an action sheet
    instead (see “Using Action Sheets” and
    “Designing an Action Sheet” for more
    information on this type of view).

    Because users sometimes respond to
    alerts without reading them carefully,
    be sure to provide an appropriate
    default choice. To help guide
    inattentive users towards this choice,
    make the light-colored, right-hand
    button the safe, default alternative.

    For example, you might choose to make
    this button the Cancel button, to help
    users avoid inadvertently causing a
    dangerous action, or you might make it
    represent the most common response, if
    the resulting action isn’t
    destructive.

    The following guidelines describe how
    buttons are configured in an alert:

    • In an alert with two buttons, the button on the left is always
      dark-colored and the button on the
      right is never dark-colored.

    • In a two-button alert that proposes a potentially risky action, the button
      that cancels the action should be on
      the right and light-colored.

    • In a two-button alert that proposes a benign action, the button that
      cancels the action should be on the
      left (and therefore dark-colored).

    • In an alert with a single button, the button is light-colored.

    You are clearly violating the guidelines in size, shape, number, and color of the buttons in your alert view (red has a very clear meaning as a destructive action, not a confirmation). Even if Apple doesn’t reject your application in review (which they tend to do for clear violations of the Human Interface Guidelines), this would be extremely confusing to your users.

    Also, navigating the hidden view hierarchy for any Apple-supplied user interface element is a very bad practice. The view hierarchies are undocumented, and do change often. Many of the applications that started crashing when people upgraded to iPhone OS 3.0 did so because those applications did something funky with subviews of UI elements, and those elements changed in the new OS version. Apple even specifically called this out in the iPhone OS 3.0 migration documents (which I can’t find now).

    Because of the problems this caused, they appear to have cracked down on this practice and have been rejecting applications because of it. Even if they don’t, it shows contempt for your users if you do this, because it means that you don’t care if your application breaks with future OS upgrade.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I asked a similar question here a while back but all the answers were
I have asked a similar question about command line arguments in C++ some hours
I have asked a similar question previously but it was never resolved so here
I have seen a similar question asked here Jquery how to validate domain name
I have asked a similar question before here , but after much thought, and
I asked similar question before and got some nice code, but i'm concerned with
I asked a similar question earlier here , and it got me down the
I asked a question similar to this one here and was given great answers,
I have already asked a similar question here: Python open raw audio data file
I already asked similar question here, but I still get some errors, so I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.