0
我需要在鈦項目的iOS模塊的自定義視圖中調用方法。我遵循了Appcelarator文檔中有關創建iOS模塊的教程。我可以使用下面的代碼在Titanium中創建自定義視圖。如何從鈦項目調用iOS模塊中的自定義視圖中的方法?
var manage = require('com.test');
var manageView = manage.createView({
left:40,
right:40,
top:40,
height: 250,
backgroundColor:'blue' }); manageView.customMethodInView();
但我得到了錯誤,如「customMethodInView是不是一個函數」當我運行的應用程序。
#import "TiViewProxy.h"
#import "CustomView.h"
@interface ComTestViewProxy : TiViewProxy {
CustomView *customView;
}
- (void) customMethodInView;
@end
這是iOS模塊項目中的viewProxy類中的代碼。 請幫忙。
你進入橋接報頭爲TiViewProxy在OBJ-c和你正在使用SWIFT –