Doh, found the answer in the comments:
1) Create the new XIB (again, choose New iPhone View, not Controller!) and
design it in XCode/IB.
2) Create a new class for your UITableViewCell subclass and make it a
partial class
Make sure it has a default constructor and the one receiving IntPtr
handle as parameter
Now, in order to create and connect the outlets, you have to Ctrl-drag
controls to the MonoTouch generated .h file in XCode. However, your manually
created class won't get recognized at first, so there's no way to set the
Class Identity to that class and there won't be a .h file for it in XCode.
Here's the trick: manually put a [Register("classname")] attribute above
your class declaration. Double click the XIB again to open it in XCode. Your
new UITableViewCell class will be there as a .h file. Now you can create
outlets as described in the "Hello iPhone" tutorial.
I think the developer experience hasn't improved since Xamarin had to
integrate with XCode 4 because IB is now part of XCode. Fiddling around with
.h files and Objective-C outlet declarations... Maybe it just takes some
time getting used to it.
--
View this message in context:
http://monotouch.2284126.n4.nabble.com/Creating-custom-UITableViewCells-the-correct-way-with-Xcode-4-tp4021787p4035152.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch