How to remove the old view from super-view and add the new view safely? My main concern is memory leak.. so, please suggest how can i do it without facing a memory leak.
first you need to remove the old view from superview and release it , after that you can add new view to your superview
code for that is
[oldview removeFromsuperView]; [oldview release];
now add the new view