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 Code:
static NSString *CellIdentifier = @”Cell”;
I got the this error :
Code:
Expected expression before @ token
also some lines farther I get a warning saying :
Code:
warning: 'setText:' is deprecated
on the line :
PHP Code:
[cell setText:[NSString stringWithFormat:@"I am cell %d", indexPath.row]];
All I do is I copy past this code from the blog to my project and I get the error.
PHP Code:
- (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;
}
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 !
Thank you