私がやりたかった以上の答えを見つけました。Titanium SDK obj-c ファイルを実際に変更する必要がありました。
3 つのファイルを変更しました。
TiUIWebView.h
-(void)resetZoomScale; //-- added this line to define the function in the header file
TiUIWebView.m
//-- Added this function that will actually handle the resize
- (void)resetZoomScale
{
[webview.scrollView setZoomScale:1.0]; //-- reset the scroll view back to 1
}
TiUIWebViewProxy.m
//-- Call the resetZoomScale function in TiUIWebView.m file
//-- I believe this also exposes the function to javascript
-(void)resetZoomScale:()args
{
TiThreadPerformOnMainThread(^{[(TiUIWebView*)[self view] resetZoomScale];}, NO);
}
これで呼び出すことができmyWebView.resetZoomScale();
、Web ビューで行われたピンチ/ズームはすべてリセットされ、なしまたは 1 に戻ります。