Opening\closing instance of object using objective c for iphone
===

I created plugin from Html to objective-c, from changing tab in My I phone-Html project,by clicing on a tab calling plugin for iphone to start some method. i am using that code:

    mypic *mypic= [[mypicalloc] initWithFrame:CGRectMake(15,45, 282, 282)];
        [[self.webView superview] addSubview:mypic];
        [mypicrelease];
        
what i am getting is my object (picture) over a page,but  when i continue to another tab the picture doesn't disappear,and always stays on other pages,over them. my questions is:

How can i hide\close it when changing tab and how to combine it with HTML page so the pic would start with my HTML page in 50%-50% Proportion and disappear when changing page.