开发者

How can I pass values from obj-C to a quartz composer view?

开发者 https://www.devze.com 2023-03-01 11:44 出处:网络
In a .xib for an application I\'m working on, I have a quartz composer viewer object (QCView) in the window. I also have a patch controller (QCPatchController). The patch controller has its own class

In a .xib for an application I'm working on, I have a quartz composer viewer object (QCView) in the window. I also have a patch controller (QCPatchController). The patch controller has its own class files in xCode, but they aren't doing anything right now. Following the apple docs, I was able to bind some values within the .nib file so if I edited a text field, it would pass this value to a published input on the QC document. Unfortunately, these docs say nothing abo开发者_Go百科ut how to pass values programatically. How can I pass values (in code) to a QC patch?

Thanks in advance!


You should be able to use -setValue:forKeyPath:. For example:

[patchController setValue:@"foo" forKeyPath:@"patch.stringinput.value"];
0

精彩评论

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