Thanks Jeff. I'll give that a try. I think I've found another way to do it. Let me know what you think.
1) Create view controller files using Add/New Files.. (Select iPhone View Controller). 2) Delete the auto generated xib file. 3) Add the xib from the old project to the new project. 4) Open the imported xib in xcode and make sure the File's Owner class is set to the type of the new controller. 5) drag controls to header file to create outlets 6) Save, exit XCode. Now the outlets appear in the designer file. I don't retain the outlets I created in the .h files, but that's ok since the code is going to be mostly re-written. -- Curtis On Tue, Feb 28, 2012 at 9:24 AM, Jeff Stedfast <[email protected]> wrote: > Hi, > > Assuming you already have the *.h files handy, I think the easiest way > might be to setup a stub MonoTouch project with a dummy .xib, double-click > the .xib to launch Xcode, and then import your real .xibs and header files > into Xcode (which will then make MonoDevelop import them into your > MonoTouch project, parsing the headers and extracting all the outlets & > actions, etc). > > Unfortunately, there's a bug in at least MonoDevelop 2.8.6.5 (and maybe > some earlier versions) that will cause a NullArgumentException in a debug > WriteLine() in MonoDevelop when it imports header files located in the > toplevel directory of the temporary Xcode project. > > I've fixed this embarrassing bug in the 2.8.8 beta that will hopefully be > going out today, so I would probably suggest waiting for that version (at > least to attempt this trick). > > I'm not 100% sure that it will work... you might need to simplify your > header files as MonoDevelop's Objective-C header file parser is rather > primitive/simplistic and was only meant to handle outlets & actions written > by Xcode, so... that said, it still might be one of the easiest ways of > doing this. > > Hope that helps, > > Jeff > > > On Tue, Feb 28, 2012 at 12:01 PM, cshipley <[email protected]>wrote: > >> >> I have some existing xib files from a project I want to convert over to >> monotouch. How can I create the controller + designer file and "attached" >> them to the existing xib file such that I can then edit the xib in xode 4 >> and have monotouch automatically wire up the controls in the designer.cs >> file? >> >> Thanks >> Curtis >> >> -- >> View this message in context: >> http://monotouch.2284126.n4.nabble.com/How-to-attach-existing-xib-to-monotouch-controller-and-use-in-xcode4-tp4428782p4428782.html >> Sent from the MonoTouch mailing list archive at Nabble.com. >> _______________________________________________ >> MonoTouch mailing list >> [email protected] >> http://lists.ximian.com/mailman/listinfo/monotouch >> > >
_______________________________________________ MonoTouch mailing list [email protected] http://lists.ximian.com/mailman/listinfo/monotouch
