开发者

TabBar Hide WebView

开发者 https://www.devze.com 2023-03-03 00:12 出处:网络
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 t

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];

    }
0

精彩评论

暂无评论...
验证码 换一张
取 消