I'm trying to learn how to use storyboards but am having a problem with control-dragging from my Table View to the detail view; it basically, doens't auto-connect
like I have something configure wrong.
Here's what it kinda looks like:
Should I even be able to do this?
Here's my code for cell creation:
-(UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier=@"MyCell";
UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if(cell==nil){
cell=[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
cell.textLabel.text=self.tasks[indexPath.row];
return cell;
}
Here's the code in my view controller (although this wouldn't seem relevant):
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
[self performSegueWithIdentifier:@"taskSegue" sender:self.tasks[indexPath.row]];
}
-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{
UIViewController *destination = segue.destinationViewController;
if([segue.identifier isEqualToString:@"taskSegue"])
[destination setValue:sender forKeyPath:@"task"];
else
destination = [segue.destinationViewController topViewController];
[destination setValue:self forKeyPath:@"delegate"];
}
thx fo