title: Unexpected interface name 'name':expected expression message
body: <p>I'm at a stage in my coffee order app where I have a UIAlertView pop up from a DetailViewController asking a yes/no to proceed. The 'yes' goes to the next View Controller, which is fine, but the 'no' also goes to the same view controller, but I just want it to return to the DetailViewController, to give the user the option to change their order. I'm using if statements as you can see in the code, but the following code comes up with the "Unexpected interface name 'DetailViewController':expected expression message"
  I am new to this, a student learning, and while there are tutorials out there, this one piece of code in my second 'if' statement for buttonIndex ==1 should be correct according to a few solutions on this site, but for some reason, I'm missing something here. I'm using XCode v7.0.1, and am also having difficulty finding up to date solutions for this version.
  (note I am aware of the deprecated code for the UIAlertView, but it is working)</p>
  
  <p>Here is the code, appreciate some help:</p>
  
  <pre><code>#import "DetailViewController.h"
  
  @interface DetailViewController ()
  
  @end
  
  @implementation DetailViewController
  @synthesize YourOrder;
  
  - (void)viewDidLoad {
      [super viewDidLoad];
      // Do any additional setup after loading the view.
  
  self.DetailTitle.text = _DetailModule[0];
  self.DetailDescription.text = _DetailModule[1];
  self.DetailImageView.image = [UIImage imageNamed:_DetailModule[2]];
  
  self.navigationItem.title = _DetailModule[0];
  self.YourOrder.text = @"";
  }
  
  - (void)didReceiveMemoryWarning {
  [super didReceiveMemoryWarning];
  // Dispose of any resources that can be recreated.
  }
  
  /*
  #pragma mark - Navigation
  
  // In a storyboard-based application, you will often want to do a little preparation before navigation
  - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  // Get the new view controller using [segue destinationViewController].
  // Pass the selected object to the new view controller.
  }
  */
  
  - (IBAction)addItem:(id)sender {
  self.YourOrder.text = [NSString stringWithFormat:@"%@ \n %@",
                         self.YourOrder.text, [sender currentTitle]];
  }
  
  - (IBAction)alertView:(id)sender {
  
  UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Send Order" message:@"Are you happy with your order?" delegate:self cancelButtonTitle:@"Yes" otherButtonTitles:@"No",nil];
  [alert show];
  }
  
  - (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex {
      // the user clicked Yes
      if (buttonIndex == 0)
      {
          // do something here...
      }
  
      // the user clicked No - need to write code to return a 'no' click to the DetailViewController to try again.
      if (buttonIndex == 1)
  
      {
          [self presentViewController:DetailViewController animated:YES completion:nil];
      }
  }
  
  @end
  </code></pre>
  
  <p>I have also tried:</p>
  
  <pre><code>if (buttonIndex == 1)
  
      {
              DetailViewController *detailView = [[DetailViewController alloc] init];
              [self presentViewController:detailView animated:YES completion:nil];
      }
  </code></pre>
  
  <p>but it still goes to the same View controller and I see the "Warning: Attempt to present  on  whose view is not in the window hierarchy!" error message.</p>