0

I'm currently trialing MonoTouch and am impressed with it's capabilities thus far.

I'm wanting to create a library of iPhone apps that each will have the same User Logon screen. Therefore, I want to create the LogonScreen ViewController once and then share it amongst my projects.

I tried adding the files as a 'link' like you do with files in Visual studio but that seemed to create a disjoint between the Login.cs and the Login.designer.cs ie the Login.Designer.cs does not appear underneath the Login.cs in the Solution explorer.

The Login.cs has also lost the reference to the txtUsername textbox control I have in my xib.

Any ideas on how to solve this problem?

4

2 回答 2

0

如果我正确理解您的问题,这将使您走上正轨:Dimitris Tavlikos 回答

这将生成一个自定义类,您可以将其抽象为应用程序的公共库。

-缺口

于 2013-03-19T04:38:37.130 回答
0

建议您将共享视图添加到单独的项目(iOS 库项目)中,并将此项目添加为参考。您将不会遇到在每个未来项目中链接单独文件的问题,当您拥有更多共享视图时,这将变得越来越复杂。

您丢失对文本字段的引用的原因是因为它“丢失”了包含这些引用的 Designer.cs 文件。

于 2013-03-22T23:25:14.677 回答