I have added UIButton and UITextView as subviews to my view programmatically.
notesDescriptionView = [[UIView alloc]initWithFrame:CGRectMake(0,0,320,460)];
notes
I assume you're calling [self.view removeFromSuperView]
from a method in the same class as the above snippet.
In that case [self.view removeFromSuperView]
removes self.view from its own superview, but self is the object from whose view you wish to remove subviews. If you want to remove all the subviews of the object, you need to do this instead:
[notesDescriptionView removeFromSuperview];
[button.view removeFromSuperview];
[textView removeFromSuperview];
Perhaps you'd want to store those subviews in an NSArray
and loop over that array invoking removeFromSuperview
on each element in that array.