user317474
user317474

Reputation:

iPhone: Expected '{' before '(' token

I'm currently developing an iPhone application, and when it comes to compiling, I have the aforementioned error. Here's the block of code it's on:

-(void)tableView(UITableView *)tableView{
didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    NextViewController *nextController = [[NextViewController alloc]
                                          initWithNibName::@"NextView" bundle:nil];
    [self.navigationController pushViewController:nextController
                                         animated:YES];
    [nextController changeItemTable:[arryClientSide
                                     objectAtIndex:indexPath.row]];
}

And the very first line in that block of code is where the error is. If you would like more code, please do ask.

Regards,
Jack

Upvotes: 0

Views: 215

Answers (4)

Mick Walker
Mick Walker

Reputation: 3847

your missing a colon, as per docs:

  • (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

Upvotes: 1

adam
adam

Reputation: 22587

You should also include the line at the end of your method

[nextController release];

Upvotes: 0

gammelgul
gammelgul

Reputation: 3460

-(void)tableView(UITableView *)tableView{

You need a : before parameter like this:

-(void)tableView:(UITableView *)tableView{

// edit: without the "{" at the end

Upvotes: 0

Vladimir
Vladimir

Reputation: 170849

First line:

-(void)tableView(UITableView *)tableView{

should be

-(void)tableView:(UITableView *)tableView

Upvotes: 6

Related Questions