Monodevelop 2.8, XCode 3.2.6, Interface Builder: Outlets and Actions -


edit: since haven't installed xcode 4 yet, know if md 2.8 compatible xcode 3.2.6 or not. in particular, able connect outlets , actions new procedure described in mt documentation?

i've installed monodevelop (md) 2.8. seems not working expecting.

in md 2.6 when create new uiviewcontroller, controller presented following:

  • controller.xib <- inside same tree
    • controller.xib.cs
    • controller.xib.designer.cs

in addition if open xib file, controller.xib, interface builder (ib) opened. if add outlets xib, outlets visible in controller.xib.designer.cs.

in md 2.8 when create new uiviewcontroller, controller presented following:

  • controller.xib <- no more inside same tree
  • controller.cs
    • controller.designer.cs

so have 2 files instead of one.

in addition if open xib file, controller.xib, ib , xcode opened. if add outlets xib, outlets aren't visible in designer.

any suggestions?

monodevelop 2.8 introduced new xib designer model in order support xcode 4.

the interface builder integrated in xcode 4 no longer supports defining classes, outlets , actions in xib files. measn it's no longer possible monodevelop use model generated *.xib.designer.cs files xib files. instead, interface builder reads outlets , actions objective-c source code. monodevelop's solution sync c# classes objective-c stubs.

when open xib file monodevelop 2.8, monodevelop creates temporary xcode project objective-c stubs mirroring c# classes exposed objective-c, i.e. classes inherit nsobject , explicitly registered [register("somename")] attribute. opens xib file in context of project, interface builder see available types , outlets , action on them. if outlets , actions added in xcode 4 using control-drag system, automatically imported *.designer.cs files in monodevelop.

this means designer files no longer generated other file, instead actual location information stored. designer files associated class instead of xib.

this new model has several upsides on top of supporting xcode 4:

  • it's possible multiple xib files refer same class.
  • the project contains content resources , other xib files, can referenced interface builder
  • interface builder 'see' outlets written on c# user class parts , base classes, not designer class parts.

in addition, it's easier write outlets manually. apply outlet attribute property, example

[outlet ("someview")] uiview someview {get; set; } 

unfortunately new model means monodevelop no longer integrates creation of outlets , actions in interface builder 3.2.x. recommendation upgrade xcode 4. loading , editing of pre-md 2.8 projects should work fine.

please see http://docs.xamarin.com/ios/tutorials/transitioning_from_xcode_3_to_xcode_4


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -