开发者

How do I create an outlet for additional views?

I'm struggling with the basics on how to build views in Monotouch and how to tie them to C# code.

I know how to create an outlet for an UIViews that are on the Main window. But how can I create an oulet for an UIView that is located on a different view?

The main view has an AppDelegate class 开发者_JAVA百科I can bind the outlets to. But there's nothing comparable on additional views, even though I chose to create an "Iphone view with Controller".


When you create an "iPhone view with controller", you can open the view controller xib and place your outlets in the UIViewController. So, if you call the new view controller MyViewContoller, you create the outlets on the MyViewController class in interface builder.

MyViewController will be the "File's Owner" in the Interface Builder project window.

Then, you can set up button handlers, etc by overriding MyViewController's ViewDidLoad method.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜