I'm trying to add a subview to a tableview cell and of course using CGRect as part of that. However, I get a syntax error on build:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
switch (indexPath.section) {
case 1:
CGRect <<- SYNTAX ERROR cellFrame = CGRectMake(0, 0, 300, 65);
cell = [[[UITableViewCell alloc] initWithFrame:cellFrame reuseIdentifier: CellIdentifier] autorelease];
CGRect infoRect = CGRectMake(0, 5, 295, 55);
UILabel *infoLabel = [[UILabel alloc] initWithFrame:infoRect];
infoLabel.tag = 1;
[cell.contentView addSubview:infoLabel];
[infoLabel release];
break;
default:
break;
}
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
I have tried right-clicking on Frameworks -> add existing framework and that does not appear to help. I guess it seems like the compiler is still not seeing the framework?
Edit: in fact, I just noticed CoreGraphics.framework was in fact already loaded into the project. So I'm really confused now.