I'm trying out the new Xcode 4.2 Beta and I'm wondering if my code is wrong or if I'm bumping in to an bug.
The new Storyboard feature is promising but extremely buggy at the moment. Right now I've created an simple project with a tableview. This tableview will be "Grouped style" containing UITextFields. The new "Prototype Cell" feature of storyboard let's you create a prototype cell in GUI that you can draw with the "Reuse identifier" in the method cellForRowAtIndexPath. When I drag in a UITextField in this "prototype cell" and draw it out, it works great!
However! When I reference this textfield to an outlet in my code I get the error: Uncategorized Compilation failed. Unable to write to path:...(Path to DerivedData)
Why is this? Is it a bug? Anyone else get this?
I've run into this problem on a couple of occasions in Xcode 4.2 (final release as well).
It's usually related to an outlet or other connection that you've set up that the compiler is upset about (for lack of a better term). The trick is determining which connection(s) that is.
You can view the detailed output of the build process in Xcode 4.2 by doing the following:
If anyones still having a problem with this i found the solution is to use tags instead of outlets.
CellForRowAtIndexPath
UILabel *titleLabel = (UILabel *)[cell viewWithTag:1001];
titleLabel.text = @"Name";
OK a collegue of mine showed me the connections inspector and voila, there was an old connection causing the build failure. So select the .storyboard file, open the connections inspector (the last with the arrow) and it will give you an overview of all the connetions.
I don't have the perfect solution to your problem but I had the same and I found a way to make it works (without linking the outlet to the TableViewController).
Just try to recreate your view from scratch and Build & Run every time you add a component.
In order add a TableViewController => Test if it shows an empty table.
Design your custom cell and link your cell's Outlets to it. (Without forgeting to change the Class of your TableViewCell) => Again test it
Then change the Class of the TableViewController to your class and now you would be able to access to your cell's outlets.
It worked for me. I hope it will for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With