TabBar Hide WebView
i'm writing an ap开发者_运维技巧plication , has a tab bar and there is a web view and i want to hide this web view when someone push to the same page's tab bar button item . Please Help !!!
on your tabbarbuttonclick write:-
[*yourwebviewname* setHidden:YES];
or if you do not want to use it further can can also do
[*yourwebviewname* removeFromSuperView];
Try this:-
NSArray *arr =[self.view subviews];
for(int i=0;i<[arr count];i++){
UIView *vw=[arr objectAtIndex:i];
if([vw isKindOfClass:[UIWebView class]])
[vw removeFromSuperview];
}
精彩评论