MCDan Master of C...

  • Männlich
  • 53
  • aus Ruhrgebiet, NRW
  • Mitglied seit 8. Dezember 2002
Letzte Aktivität
, Liest das Thema Suche zwei 27" Monitore für ein M1 Pro MacBook

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • XcodeSearch -

    Ich habe das Programm geändert und @end ans ende des Programms geschrieben, jetzt wird aber in zwei Zeilen "Use of uncleared Identifier "angezeigt.

    import "ViewController.h"

    @interface ViewController ()

    @end

    @implementation ViewController {
    NSArray *recipes;
    }

    @synthesize tableView;

    - (void)viewDidLoad
    {
    [super viewDidLoad];
    // Initialize table data
    recipes = [NSArray arrayWithObjects:@"Egg Benedict", @"Mushroom Risotto", @"Full Breakfast", @"Hamburger", @"Ham and Egg Sandwich", @"Creme Brelee", @"White Chocolate Donut", @"Starbucks Coffee", @"Vegetable Curry", @"Instant Noodle with Egg", @"Noodle with BBQ Pork", @"Japanese Noodle with Pork", @"Green Tea", @"Thai Shrimp Cake", @"Angry Birds Cake", @"Ham and Cheese Panini", nil];
    }
    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
    {
    return 71;
    }
    - (void)viewDidUnload
    {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    }

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
    {
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
    }

    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
    {
    return [recipes count];
    }

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
    static NSString *simpleTableIdentifier = @"RecipeCell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];

    if (cell == nil) {
    cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier];
    }
    cell.textLabel.text = [recipes objectAtIndex:indexPath.row];
    return cell;
    }
    - (void)prepareForSegue:
    (UIStoryboardSegue *)segue sender:(id)sender {
    if ([segue.identifier isEqualToString:@"showRecipeDetail"]) {
    NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];




    RecipeDetailViewController *destViewController = segue.destinationViewController; genau hier




    destViewController.recipeName = [recipes objectAtIndex:indexPath.row];
    }
    }
    @end