Is it possible to create a stand-alone Monotouch class library?
I'm all about code reuse. One of the best ways in .NET/Mono is to create a cla开发者_Python百科ss library. I have a few custom UIViews that I would like to place in a class library (.dll) so that I can redistribute it but for some reason I am not able to create a project that references monotouch from a stand-alone library. The only way to reference it is to create a full blown iPhone project -- not what I want.
Any help would be appreciated.
Under MonoDevelop project types C#->iPhone and iPad, I have
- iPhone Window-based Project
- iPhone OpenGL Project
- iPhone Navigation-based Project
- iPhone Utility Project
- MonoTouch Library Project
- Empty MonoTouch Project
- iPad Window-based Project
- Universal Window-based Project
You want MonoTouch Library Project. This will compile a DLL that can be referenced in another MonoTouch project.
I know this works because I have 2 projects that reference a DLL I created just for the benefit of reusing code.
精彩评论