tags:

views:

110

answers:

1

I have the need to display a specific view on a separate screen, similar to how Keynotes handles presentation mode.

I've managed this successfully by checking how many screens are available, and then adding the view I want displayed as a subview of the second window.

However, if I dismiss the parent view that handles the creation of the subview, the second screen is never 'disabled' and the view remains on screen. Is there some form of [externalWindow removeSubview] call that I am missing? I release the view I've added to the extra window in the dealloc method of the class that creates it, but am not sure how i should be handling the extra window.

+1  A: 

I think the external window keeps a copy of the last output until your app (or another app) outputs something new. Try blanking the external window before disabling output. You can try setting externalWindow.backgroundColor = [UIColor blackColor] or adding a temporary black UIView before disabling output.

Good luck!

rjobidon
I ended up solving this with a thorough re-factoring of my codebase. The point in which I was creating the extra screen had a view that shared some model code with the current iPad's view, so I was unable to release it completely at will. After a refactor I could release the view + window and it would clear the extra screen (not in the ismulator however), but this answer is correct in that it clears the screen - so thanks :)
davbryn