Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Problem with : static NSString *CellIdentifier = @

H_RH_R Posts: 2New Users
edited August 2011 in Tutorial Discussion
Well, I am Really new to Objective C and cannot figure my problems out easily by my own. It might be silly but I am stuck on something really stupid!

I am trying to go along this tutorial
Custom UITableViewCell Using Interface Builder | iPhone Programming Tutorials

and on this line :
[PHP]static NSString *CellIdentifier = @”Cell”;[/PHP]
I got the this error :
Expected expression before @ token

also some lines farther I get a warning saying :
warning: 'setText:' is deprecated
on the line :
[PHP][cell setText:[NSString stringWithFormat:@I am cell %d, indexPath.row]];[/PHP]


All I do is I copy past this code from the blog to my project and I get the error.
[PHP]- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath

{

static NSString *CellIdentifier = @”Cell”;

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

if (cell == nil){

cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];

}

[cell setText:[NSString stringWithFormat:@I am cell %d, indexPath.row]];

return cell;

}[/PHP]

I think something has been changed in SDK since the tutorial been published. Itryed every thing even deleting Xcode 4 and installing Xcode 3 ! it is not Working !:confused:

Thank you :)
Post edited by H_R on

Replies

  • H_RH_R Posts: 2New Users
    edited August 2011
    well ,I found the answer ! allegedly the quotation mark was a wrong character! (") it took me a while to figure it out though !
Sign In or Register to comment.