title: Do we always needs to dismissModelViewController that we had presented?
body: <p><strong>I have Edited whole Question</strong></p>
  
  <p>What is the difference between presenting the ModelView Controller and dismissing the modal view controller in following situation??</p>
  
  <ol>
  <li>HomeView</li>
  <li>TableItemSelection View</li>
  <li>PickerView</li>
  </ol>
  
  <p>In <strong>HomeView</strong>
  I am writing code in <code>viewWillAppear</code> to fetch values from NSUserDefault that is set from TableView. Below is my code for viewDidLoad (for initial values) and viewWillAppear(when new value from tableview)</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      actionMinutes = @"0";
      actionSeconds = @"0";
      restMinutes = @"0";
      restSeconds = @"0";
  }
  
  - (void) viewWillAppear:(BOOL)animated
  {
      actionMin = [actionMinutes intValue];
      actionSec = [actionSeconds intValue];
      restMin = [restMinutes intValue];
      restSec = [restSeconds intValue];
      NSLog(@"acMin:%d acSec:%d reMin:%d reSec:%d",actionMin,actionSec,restMin,restSec);
  }
  </code></pre>
  
  <p>In <strong>TableItemSelection View</strong>
  I am presenting this view from HomeView. Now i want to set value of NSString in HomeView based on Table's didSelectRowAtIndex Method. I am using <code>NSUserDefault</code> to set the value.
  And with Done Button touch i am presenting HomeView. (Actually I have to dismissModalViewController) But when i use dismiss I am not able to get values in NSString of HomeView. I am getting values of the table from PickerView.  (I am instructed to do that). Below is my code for Table view on DONE button touch</p>
  
  <pre><code>HomeView *homeView = [[HomeView alloc] init];
  [homeView.view setBackgroundColor:[UIColor clearColor]];
  [homeView.view setFrame:CGRectMake(0 ,40, 320, 460)];
  homeView.actionMinutes = [[NSUserDefaults standardUserDefaults] valueForKey:@"actionMinute"];
  homeView.actionSeconds = [[NSUserDefaults standardUserDefaults] valueForKey:@"actionSecond"];
  homeView.restMinutes = [[NSUserDefaults standardUserDefaults] valueForKey:@"restMinute"];
  homeView.restSeconds = [[NSUserDefaults standardUserDefaults] valueForKey:@"restSecond"];
  homeView.song = [[NSUserDefaults standardUserDefaults] valueForKey:@"songstring"];
  NSLog(@"%@",homeView.actionMinutes);
  [self presentModalViewController:homeView animated:YES];
  
  //[self dismissModalViewControllerAnimated:YES];    // if this method is used then no values are passed to HomeView
  
  [homeView release];
  </code></pre>
  
  <p>In <strong>PickerView</strong>
  I am fetching the values from pickerview and then store it in UserDefault.
  below is my code for pickerview</p>
  
  <pre><code>NSUserDefaults *actionTime = [NSUserDefaults standardUserDefaults];
  [actionTime setValue:min forKey:@"actionMinute"];
  [actionTime setValue:sec forKey:@"actionSecond"];
  </code></pre>
  
  <p>So why exactly i am not able to get UserDefault values when dismissing ModelView.??? Does presenting a new view everytime will make a stack of views???</p>