my iPad application use开发者_如何学编程s 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.
René
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).
精彩评论