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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:58:09+00:00 2026-06-10T06:58:09+00:00

I first use [UIAlertView alloc] initWithTitle: to resize and customize AlertView with image but

  • 0

I first use ” [UIAlertView alloc] initWithTitle: ” to resize and customize AlertView with image but failed.

Then I use following codes, all works fine ( alertView resized and have a image with it), But just can’t have a button to dismiss the alertView. Stuck here for half day. Please help, thanks!

UIAlertView* find = [[[UIAlertView alloc] init]initWithFrame:CGRectMake(0,0,300,420)];
    [find setDelegate:self];
    [find setTitle:@"Sample Alert"];
    [find setNeedsLayout];

UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(220, 10, 80, 80)];

NSString *path = [[NSString alloc] initWithString:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"111.png"]];
UIImage *bkgImg = [[UIImage alloc] initWithContentsOfFile:path];
[imageView setImage:bkgImg];
[bkgImg release];
[path release];

 [find addSubview:imageView];
[imageView release];

[find show];
find.frame = CGRectMake(0,0,300,200);

[find release];
  • 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-10T06:58:10+00:00Added an answer on June 10, 2026 at 6:58 am

    UIAlertView was not made to be initialized in such a manner. Usually you initialize a UIAlertView using initWithTitle:message:delegate:cancelButtonTitle:otherButtonTitles: .

    You can try using [find addButtonWithTitle:@"button 1"]; . You will also need to implement the UIAlertView Delegate to interact with the button.

    If that does not work, i recommend implementing your own custom view if you are looking for a heavily modified look.

    hope this helps.

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

Sidebar

Related Questions

I have an UIAlert UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@ok message:@Canc? delegate:self cancelButtonTitle:@OK otherButtonTitles:@Annul,
In Java all classes are loaded into the JVM dynamically, upon the first use
The following setup kind of works, but it's not the proper use of TempData,
R newbie here. If I first use map('state') , how can I then use
I know one awkward solution for this taks will be : first use ct
we want to have the second biggest element. We first use ANY to exclude
first time use JTree. Just wondering is it possible to have more than one
I divide dynamic websites into two types: The first one use e.g PHP ,
I want to lazy load of @Lob properties. First ,i use javassist to instrument
First off I use this code to make the navigation bar always stay fixed;

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.