0

I'm developing an application for iPhone.

I wrote this code.

SelectYearTableViewController.m

...

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    SelectAWeekTableViewController_iPhone *saw = [[SelectAWeekTableViewController_iPhone alloc]init];

    [self dismissViewControllerAnimated:YES completion:nil];

    [saw makeArray:indexPath.row+1 year:indexPath.section+2008];
}

...

SelectAWeekTableViewController_iPhone.h

...

- (void)makeArray:(NSInteger)month year:(NSInteger)year
{
    NSLog(@"date%d:%d",month,year);

    ...
}

...

I selected second row and first section.

But this application outputs this log.

2014-03-29 13:47:13.229 TTManager[5098:60b] date3:2014

Why it outputs incorrect integers and what can I do?

Thank you for reading.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Rukkora
  • 186
  • 2
  • 11

0 Answers0