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 8671993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T19:05:32+00:00 2026-06-12T19:05:32+00:00

I have created category for UIAlertView and overridden the delegate method willPresentAlertView but my

  • 0

I have created category for UIAlertView and overridden the delegate method willPresentAlertView but my method in the category not getting fired.

sample code :

@interface UIAlertView (CustomAlert)
@end

@implementation UIAlertView (CustomAlert)
- (void)willPresentAlertView:(UIAlertView *)alertView1
{

    for (UIView *sub in [alertView1 subviews])
    {
        if([sub class] == [UIImageView class])
        {
            ((UIImageView *)sub).image=nil;
            ((UIImageView *)sub).backgroundColor = [UIColor blackColor];
        }
    }

    [alertView1.layer setBorderColor:[[UIColor whiteColor] CGColor]];
    [alertView1.layer setCornerRadius:0];
    [alertView1.layer setBorderWidth:2];
}

@end
  • 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-06-12T19:05:34+00:00Added an answer on June 12, 2026 at 7:05 pm

    If your intent is providing a default implementation for willPresentAlertView delegate method, then your approach (defining willPresentAlertView in a UIAlertView category) is correct. You only need to pass the alert itself as a delegate so that the method is called:

     UIAlertView* alert = ...
     alert.delegate = alert;
    

    If you do not do that, your delegate method will not be called.

    On the other hand, I doubt that defining a default implementation like that is really of great use, since in principle each alert would need its own specific delegate method.

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

Sidebar

Related Questions

i have created a dynamic side category menu.....in jquery, But its sometimes doesn't work
I have created a file explorer and register <action android:name=android.intent.action.GET_CONTENT /> <category android:name=android.intent.category.DEFAULT />
I have following Table with records for ActivityLog: ID, UserId, Category, Created 1 11
I have some Javascript code that creates 2 arrays: One for Product Category and
I have created a category template in Wordpress for all posts that are in
I have created a sample query in sql server to parse data from xml
I have created a plugin project in eclipse to create a new category and
I have created a Facebook page a while ago, but now when i typ
I have created this model. But I need each song need each artist How
I have created a custom post type calles articles and a custom category like

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.