Ios 非平衡跃迁

Ios 非平衡跃迁,ios,objective-c,ios5,ios6,Ios,Objective C,Ios5,Ios6,我有一个问题,当我的代码执行后,我点击表上的项目,它会把我带到细节视图。事情显示正常,但控制台中显示以下消息: 2013-03-27 13:09:30.616链接测试[3605:c07]对的不平衡呼叫 的开始/结束外观过渡 我知道这里经常报道这一点,并仔细查看了答案,但似乎没有任何效果。也许我做错了什么。以下是tableviewcontroller的代码: #import "EventListingTableViewController.h" #import "EventListingDeta

我有一个问题,当我的代码执行后,我点击表上的项目,它会把我带到细节视图。事情显示正常,但控制台中显示以下消息:

2013-03-27 13:09:30.616链接测试[3605:c07]对的不平衡呼叫 的开始/结束外观过渡

我知道这里经常报道这一点,并仔细查看了答案,但似乎没有任何效果。也许我做错了什么。以下是tableviewcontroller的代码:

#import "EventListingTableViewController.h"
#import "EventListingDetailViewController.h"

@interface EventListingTableViewController ()

@end

@implementation EventListingTableViewController

- (id)initWithStyle:(UITableViewStyle)style
{
    self = [super initWithStyle:style];
    if (self) {
        // Custom initialization
    }
    return self;
}


-(void)fetchEventDetails
{    
    NSData *jsonData = [NSData dataWithContentsOfURL:[NSURL URLWithString:@"http://xsysdevelopment.com/ios/read.php"]];
    NSDictionary *dict = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:nil];
    self.eventsTitles = [[NSMutableArray alloc] init];
    self.eventsCity = [[NSMutableArray alloc] init];

    for(id object in dict){
        [self.eventsTitles addObject:object[@"title"]];
        [self.eventsCity addObject:object[@"city"]];
    }

}

- (void)viewDidLoad
{
    [super viewDidLoad];

    [self fetchEventDetails];
    // Uncomment the following line to preserve selection between presentations.
    //self.clearsSelectionOnViewWillAppear = NO;

    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;


}


- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    // Return the number of sections.
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    // Return the number of rows in the section.
    return self.eventsTitles.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];

     int row = [indexPath row];

    cell.textLabel.text = self.eventsTitles[row];
    cell.detailTextLabel.text = self.eventsCity[row];

    return cell;
}




#pragma mark - Table view delegate

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{

    // Navigation logic may go here. Create and push another view controller.

     EventListingDetailViewController *detailViewController = [[EventListingDetailViewController alloc] initWithNibName:@"EventListingDetailViewController" bundle:nil]; 
     // ...
     // Pass the selected object to the new view controller.
     [self.navigationController pushViewController:detailViewController animated:YES];

}

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
     if ([[segue identifier] isEqualToString:@"eventDetailSeague"])
     {

         NSIndexPath *indexPath = [self.tableView indexPathForSelectedRow];
         EventListingDetailViewController *detailViewController = [segue destinationViewController];

         int row = [indexPath row];

         detailViewController.eventDetails = @[self.eventsTitles[row], self.eventsCity[row]];



     }
}
如果有人告诉我哪里出了问题,我会非常感激。我是iOS新手,所以只有有用的批评才会有用


关于

如果您正在通过故事板为
UITableView
使用segues,则不需要
didSelectRowAtIndexPath:
中的代码。我相信你是因为这个才推了两下