my iPad application uses UIDocumentInteractionController to preview documents. I fire it up from one of my controllers like this:
this.oPreviewController = UIDocumentInteractionController.FromUrl ( NSUrl.FromFilename ( sFilename ) ); oPreviewController.Delegate = new PreviewControllerDelegate ( this ); bool bCanPreview = oPreviewController.PresentPreview ( true );
When I dismiss the view (click the "done" button), the preview disappears but the details view I started it from is empty or UI wise coprrupt. When I use a navigation controller which is also visible and navigate back, I end up at another empty view.
When I debug, I can see that my controllers' views are NULL. What is whiping them?
Are my views garbage collected? It happens on the device only, never in simulator.
preguntado el 09 de enero de 11 a las 00:01
It is not a bug but correct behavior. As memory was low, resources got released by GC. I had to change some of my code from ViewDidAppear into ViewDidLoad and now it works (reconnecting the UITableView's source for instance).