[MonoTouch] Inherited UIViewController tip
competent_tech
xamarinforums at competent.com
Mon Oct 24 21:07:47 EDT 2011
I just spent a good deal of time chasing down an issue with header files not
being generated for xibs after upgrading to MD 2.8/MT 5.0 and wanted to
share what worked for me in the hopes that it will save someone else some
time and hair.
Many of our views inherit from a hierarchy of base classes that ultimately
inherit from UIViewController. After upgrading to MD 2.8/MT 5.0, I opened
one of the views to make a change and discovered that the header file for
xcode had not been generated.
I played with various settings, added new views to confirm that the MD/XCode
integration was working correctly, and finally changed the base class for
the view back to UIViewController. As soon as I did this, the header file
was generated.
I then went and looked at the base classes and they were still registered
correctly, but I did notice it was a more verbose registration statement
than the new views that I had created: the existing classes were registered
with the fullly qualified path to the attribute
(Monotouch.Foundation.Register) whereas the new views included a using
Montouch.Foundation statement and the Register attribute on its own.
As soon as I changed the base classes to the Register attribute only, the
header file was generated.
So, if you are upgrading to MD 2.8/MT 5.0 and run into issues with the
header files not being generated, try changing your
Monotouch.Foundation.Register attributes to Register.
--
View this message in context: http://monotouch.2284126.n4.nabble.com/Inherited-UIViewController-tip-tp3935207p3935207.html
Sent from the MonoTouch mailing list archive at Nabble.com.
More information about the MonoTouch
mailing list