UIAlertView within XML Parser didEndElement not showing
I am working on an iphone application. Application uses .net web service to perform an operation and return the status either "Success" or "Failure".
I am getting this status in xml parser didEndElement like
if( [elementName isEqualToString:@"OperationStatusResult"])
{
}
I am trying to show an UIAlert view if status is failure within didEndElement but it does not show. Is the开发者_开发百科re anything I am missing here.
Any help would be greatly appreciated.
Thanks
I am trying to show an UIAlert view if status is failure within didEndElement but it does not show. Is there anything I am missing here.
If you are running the XML parsing in a background thread, make sure you perform the UI update on the main thread.
Put your UIAlertView
code into a selector in your view controller and use the -performSelectorOnMainThread...
method to fire off the alert view, if the status fails.
精彩评论