title: trying to make tabbed uiwebview browser need help xcode
body: <p>I am trying to make tab browser just like safari or chrome with tabs. 
  when user open new url, webview will be added to array. and when user tap on button then openLoadedWebview: will called and remove the original webview and open a loaded webview from array.</p>
  
  <p><strong>But it is not happening. things working are:</strong>
  webview removefromsuperview works.
  wv succesfully added to self.view. with index number
  <strong>issue:</strong>
  new added wv is same as webview with same url.</p>
  
  <p>any better idea or approach... I am totally new...</p>
  
  <p><strong>mainViewController.h</strong></p>
  
  <pre><code> @interface mainViewController : UIViewController &lt;UITextFieldDelegate, UIWebViewDelegate&gt;
      {
          UIWebView *webView;
          UIWebView *wv;
      }
      @property (nonatomic, strong) NSMutableArray *array;
  </code></pre>
  
  <p><strong>mainViewController.m</strong></p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      webView = [[UIWebView alloc]init];
      webView.frame = CGRectMake(10, 130, 300, 400);
      webView.delegate = self;
      [self.view addSubview:webView];
  }
  
  
  -(BOOL)textFieldShouldReturn:(UITextField *)textField {
  
  
      textField.text = [self repairURL:textField.text];
      NSURL *url = [[NSURL alloc] initWithString:textField.text];
      NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
      [webView loadRequest:request];
      [array addObject:webView];
  
      return true;
  }
  
  -(void)openLoadedWebview:(NSString *)pageLabel
  
      if ([cell.label.text isEqualToString:@"Trending"]) {
                  NSLog(@"Selected Cell: %@", pageLabel);
              NSLog(@"number of objects %d", [array count]);
             // wv = [[UIWebView alloc]init];
  
              wv = [array objectAtIndex:0];
              wv.frame = CGRectMake(10, 100, 300, 400);
              wv.delegate = self;
              [self.view addSubview:wv];
  
  
          }
        else if ([cell.label.text isEqualToString:@"Rec"]) {
  
              wv = [array objectAtIndex:1];
              wv.frame = CGRectMake(10, 100, 300, 400);
              wv.delegate = self;
              [self.view addSubview:wv];
          }
  
  [webView removeFromSuperview];
  }
  </code></pre>