title: NSUserDefaults not getting stored string value
body: <p>I have <code>UIWebView</code> for reading content. After that i select some text from content stores in string using <code>NSUserDefaults</code> in Viewcontroller. Then i retrieve this string value and displays in <code>UITextView</code> to  viewcontroller1. But the <code>UITextView</code> is not updating text from viewcontroller. The <code>NSUserDefaults</code> also not getting updating text. Im using <code>[self.navigationController pushViewController:viewcontroller1 animated:YES];</code> for switch to viewcontroller1. </p>
  
  <p>viewcontroller:</p>
  
  <pre><code>[wbCont loadHTMLString:webString baseURL:nil];
      [self.view addSubview:wbCont];
  
      NSMutableArray *items = [[[UIMenuController sharedMenuController] menuItems] mutableCopy];
      if (!items) items = [[NSMutableArray alloc] init];
  
      UIMenuItem *menuItem;
      menuItem = [[UIMenuItem alloc] initWithTitle:@"BookMark" action:@selector(save:)];
      [items addObject:menuItem];
      [menuItem release];
      menuItem = [[UIMenuItem alloc] initWithTitle:@"Note" action:@selector(note:)];
      [items addObject:menuItem];
      [menuItem release];
  
      [[UIMenuController sharedMenuController] setMenuItems:items];
      [items release];
  
  
  - (BOOL) canPerformAction:(SEL)action withSender:(id)sender
  {
      if (action == @selector(save:))
      {
          return YES;
  
  
  
      }
      else if (action == @selector(note:))
      {
          return YES;
      }
      else if (action == @selector(copy:))
      {
          return NO;
      }
  
      return [super canPerformAction:action withSender:sender];
  }
  
  
      -(void)save:(id)sender{
          NSString   *selection = [wbCont stringByEvaluatingJavaScriptFromString:@"window.getSelection().toString()"];
  
          NSLog(@"selection is %@",selection);
  
           NSUserDefaults *userData1 = [NSUserDefaults standardUserDefaults];  
              [userData1 setObject:selection forKey:@"preferenceName"];
  
              [userData1 synchronize];
  
             [self.navigationController pushViewController:note animated:YES];
  
      }
  </code></pre>
  
  <p>viewcontroller1:</p>
  
  <pre><code>textView = [[UITextView alloc]initWithFrame:CGRectMake(0,0,320,400)];
  NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
      // getting an NSString
      NSString *savedValue = [prefs stringForKey:@"preferenceName"];
  NSLog(@"saved is %@", savedValue);
  textView.text = [NSString stringWithFormat:@"%@", savedValue];
  </code></pre>