Reputation: 381
I Using a Uialertview in my class.
Here is my code
UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:nil message:@"message" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[alertView show];
But the problem is when I press the ok button, the alert hides, but the black background is still there.
Does anyone have the answer for this?
Upvotes: 0
Views: 318
Reputation: 4712
Try,
UIAlertView *alertView = [[UIAlertView alloc]initWithTitle:@"" message:@"message" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[alertView show];
Upvotes: 0
Reputation: 2784
Try this.
UIAlertView * alertView = [[[UIAlertView alloc] initWithTitle:@"" message:@"message" delegate:nil cancelButtonTitle:@"Okay" otherButtonTitles:nil, nil] autorelease];
[alertView show];
Upvotes: 1
Reputation: 47069
In Your Code [[UIAlertView alloc]initWithTitle:nil @"message"
should initWithTitle:@"message"
Such Like,
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Your Title" message:@"Your Message Body !!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
Upvotes: 0