views:

80

answers:

0

Hi there,

I want to add at-runtime some behaviour to some controls:

Suppose we have a UISwitch. The next thing I want to do, is reading an UIML file and add some action to the UISwitch. This action is described in the UIML document. UIML is an XML document.

Suppose we have an interface with 1 switch and 1 textfield. When changing the value of the switch, I want to change the textfield text. I want to specify what text has to put into the text field:

- (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents

Is it possible to specify an action where the target is an other widget in the interface, where I also want to specify a parameter like NSString ?

So: when clicking the uiswitch, i want to change the text field text. Another example is changing the backgroundcolor of a view,... This is being read from the UIML - XML file I specify.

Thank you in advance