I am using a UIAlertview
and inside that one activity indicator in viewdidload()
.But i tried to remove its from superview after a delay but after removing UIAlertview
using following code i am not able to do anything in app.Is like a new transparent layer is still running above my view.
CODE
-(void)startAlertActivity
{
_alertView = [[UIAlertView alloc] initWithTitle:@"Loading "
message:@"\n"
delegate:self
cancelButtonTitle:nil
otherButtonTitles:nil];
spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
spinner.center = CGPointMake(139.5, 75.5); // .5 so it doesn't blur
[_alertView addSubview:spinner];
[spinner startAnimating];
[_alertView show];
[_alertView performSelector:@selector(stopAlertActivity) withObject:self afterDelay:5.0];
}
-(void)stopAlertActivity
{ [spinner stopAnimating];
[_alertView dismissWithClickedButtonIndex:0 animated:YES];
}
ITS look like a transparent layer still running on screen,How can i close that?
example image....
for me that alert is not in screen now but the background is there in light blue color
CRASH REPORT
[UIAlertView stopAlertActivity]: unrecognized selector sent to instance 0x9ab5eb0
2013-08-02 12:20:43.822 AssamKart[5719:12203] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIAlertView stopAlertActivity]: unrecognized selector sent to instance 0x9ab5eb0'
*** First throw call stack: