I am having trouble with my UITableView in the NavigationController.
When I add data to the table I use another class to download images to display in that table, while all that works great but if in the middle of images being download I swtich back to the previous view in the navigationcontroller app crashed.

Here is my code to explain further

```
- (void)connectionDidFinishLoading:(NSURLConnection *)connection
{
    // Set appIcon and clear temporary data/image
    UIImage *image = [[UIImage alloc] initWithData:self.activeDownload];
    UIImage *appIcon;

    if (image.size.width != kAppIconHeight && image.size.height != kAppIconHeight)
    {
        CGSize itemSize = CGSizeMake(125, 85);
        UIGraphicsBeginImageContext(itemSize);
        CGRect imageRect = CGRectMake(0.0, 0.0, itemSize.width, itemSize.height);
        [image drawInRect:imageRect];
        appIcon = UIGraphicsGetImageFromCurrentImageContext();
        ///UIGraphicsEndImageContext();
    }
    else
    {
        appIcon = image;
        //self.appRecord.appIcon = image;
    }

    self.activeDownload = nil;

    // Release the connection now that it's finished
    self.imageConnection = nil;

    // call our delegate and tell it that our icon is ready for display
    if(delegate != nil)
    [delegate appImageDidLoad:self.indexPathInTableView imaged:appIcon ];

 [image release];

}

```

The appImageDidLoad is a method that exists in my UITableView view.

Is there a way I can check to see if the UITableView is valid in my imagedownload class so I know not to send the image.

Thanks in advance.
['https://Stackoverflow.com/questions/2377096', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/190892/']
If you view all files for the project and then view the file called Reference.svcmap for the appropriate service reference could you please let me know what the following config options are in the xml?

```
<ExcludedTypes />
<ImportXmlTypes>false</ImportXmlTypes>
<GenerateInternalTypes>false</GenerateInternalTypes>
<GenerateSerializableTypes>false</GenerateSerializableTypes>
<Serializer>Auto</Serializer>

```

Sorry about putting it in as an answer but it was horribly unreadable in the comments.

**Edit**

Ok, so what is happening here is following:

1. You are using auto for the serializer.
2. The default is DataContractSerializer
3. When generating the proxy code, there is a check for forbidden xsd elements.
4. If forbidden elements are found, the XmlSerializer is used.

In your case, adding the xsd:any element is causing the serialization mode to change. If you want consistent serialization, you will have to remove the forbidden element or force the proxy generation to use XmlSerialization all the time.

[Here](http://msdn.microsoft.com/en-us/library/ms733112.aspx) is a link about the allowable schema elements for the DataContractSerializer.

Cheers
-Leigh
As far as I know, proxy classes are generated by SvcUtil.exe why do not you look at it with reflector...