Unauthorized compilation Invalid error in iOS5 storyboard

I had a very strange error compiling my application, just like in the picture below, does anyone know what is going on?

enter image description here

Errors in the log:

Mistake

: fail compilation.

Underlying Errors: Description: Couldn't compile connection: <IBCocoaTouchOutletConnection:0x400d6f420 <IBProxyObject:0x400d6e080> => nameShow => <IBUILabel: 0x400c7e0c0> Description: Couldn't compile connection: <IBCocoaTouchOutletConnection:0x400d71200 <IBProxyObject:0x400d6e080> => catShow => <IBUILabel: 0x400bf9280> Description: Couldn't compile connection: <IBCocoaTouchOutletConnection:0x400d6ffc0 <IBProxyObject:0x400d6e080> => numShow => <IBUILabel: 0x400be0380> 
+8
ios error-handling storyboard
source share
2 answers

The problem is that you have IBOutlets that reference prototype cells. Note that prototype cells are just prototypes. This way you can have multiple instances of each. Therefore, Xcode will not know which instance binds the IBOutlet variable to.

You will have to wait until cells are created inside cellForRowAtIndexPath to assign properties

+18
source share

This can help. The key is that you need to set the tag values ​​in IB for your advertising outlets.

 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [[UITableViewCell alloc] init]; cell = [tableView dequeueReusableCellWithIdentifier:@"LogRecordCell"]; cmiJournal = (CMIJournal *)[fetchedResultsController objectAtIndexPath:indexPath]; UILabel *useJName = (UILabel *)[cell.contentView viewWithTag:101]; UILabel *useJTime = (UILabel *)[cell.contentView viewWithTag:102]; UITextView *useJRecord = (UITextView *)[cell.contentView viewWithTag:103]; useJName.text = cmiJournal.cmiJournalName; useJTime.text = fnlDate; useJRecord.text = cmiJournal.cmiJournalRecord; return cell; } 
+2
source share

All Articles