How to get outlets inserted in MonoTouch / MonoDevelop / UIBuilder?
So I have started to play around with MonoTouch.
- OS X 10.6.8
- MonoTouch v4.0.3
- MonoDevelop v2.4.2
- Mono Framework v2.10.2
- XCode v3.2.6
So I'm having problems with the outlets. Creating a simple one page program, editing the XIB in Interface Builder to add outlets, they are properly inserted as class properties into the MainWindow.xib.designer.cs
like so:
[MonoTouch.Foundation.Connect("btnClickMe")]
private MonoTouch.开发者_开发知识库UIKit.UIButton btnClickMe {
get {
this.__mt_btnClickMe = ((MonoTouch.UIKit.UIButton)(this.GetNativeField("btnClickMe")));
return this.__mt_btnClickMe;
}
set {
this.__mt_btnClickMe = value;
this.SetNativeField("btnClickMe", value);
}
}
However, when I create a multi page navigation based project in MonoDevelop and create outlets for my Views, they are not inserted into the *.designer.xib.cs files.
This is probably some noob beginner mistake, but what could I be doing wrong?
Well, after fiddling around, I found out the issue.
I added my outlets in the View
class in the Library Windows.
The correct place to add them is in the File's Owner
class.
@Dimitris, add your comment as an answer, and I can accept it as an answer.
精彩评论