Question

We would like to separate some XIBs/AXMLs and all images away from corresponding projects in MonoDevelop to get an easy-to-use white labeling feature. Having the ability to add custom build configurations and specify the projects to be built in each, we ended up with the following structure:

  1. MonoToch project
    • BL
    • Controller classes
  2. A type project
    • Images folder
    • XIB folder
  3. B type project
    • Images folder
    • XIB folder

Having A and B configurations set up, the resulting product would use images and xibs from A or B project in the solution (same applies to Android one) overriding default ones just in case the main project contains the same files.

Everything is just perfect, but one thing: XIB files from A and B project do not see controller classes (declared in main project), which makes desining them in IB a bit of a pain.

So, here comes the question: how would one tell MonoDevelop to discover classes for stabs from different projects (not only the one XIBs reside in)?

Many thanks in advance :)

Était-ce utile?

La solution

Sorry, the Obj-C stubs that MonoDevelop exports to dummy Xcode projects to make the Xcode designer aware of user-defined types do not currently include types from libraries.

You should still be able to use types from libraries but you'll have to manually type their Register'd names into the "custom class" field in the Xcode designer. Unfortunately connecting outlets and attributes would not be possible, but the designer would not remove existing connections.

A way to work around this limitation might be to create the xib in project 1, and set any custom types on controls, and connect outlets and actions. Next, remove the xib from that project, and copy it into projects 2 and 3. In those projects you should be able to modify properties of the controls on the xibs without breaking the outlet/action connections.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top