[英]obj-c method with multiple args in javascript
我正在用obj-c編寫的Xcode中的appcelerator模塊。
我有一種方法需要多個arg,如下所示:
-(void)useThis:(NSString*)this withThat:(NSString*)that{}
在appcelerator中,我將如何調用該方法? 正確的語法是什么?
var foo = require("module");
foo.useThiswithThat("this","that");
似乎不起作用。
我不確定是否可行。 (我認為當前的方法行不通)。
當我為Titanium開發模塊時,在這種情況下,我使用以下命令:
-(void)useThisWithThat:(NSArray *)thisThat
{
// Array contains both this and that
}
並稱為:
foo.useThiswithThat(["this","that"]);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.