I'm wondering if there is a method to check if a UIView has been removed from its superview or if it's still there. I'm using "removeFromSuperview" to remove the UIView, and even release it from memory.
I know I can simply create a boolean that keeps track of it by setting it at the same time the view loads/unloads, but just thought this would be neater.
What I've tried so far is to check it's existence using this code:
But it always returns true even though myView has been removed.
If it's any help, the view has been created entirely by code and has no nib-file.
Code:
[myView removeFromSuperview];
[myView release];
I know I can simply create a boolean that keeps track of it by setting it at the same time the view loads/unloads, but just thought this would be neater.
What I've tried so far is to check it's existence using this code:
Code:
if (myView) {}
But it always returns true even though myView has been removed.
If it's any help, the view has been created entirely by code and has no nib-file.