Iphone UIWebView和安装问题
我有两个问题使我陷入困境Iphone UIWebView和安装问题,iphone,Iphone,我有两个问题使我陷入困境 我在UIView上拖拽了一个UIWebView,然后我就无法获取触摸事件,我只能从UIView中获取 iphone是否可以在安装时运行应用程序?另一方面,它可以在完成安装后立即启动 问题1. 这是因为UIWebview吃触摸,所以触摸不会进入UIView。 如果需要touch,则需要使用方法对应用程序窗口进行子类化 - (void)sendEvent:(UIEvent *)event { //NSLog(@"tap detect"); NSArray *allTou
这是因为UIWebview吃触摸,所以触摸不会进入UIView。
如果需要touch,则需要使用方法对应用程序窗口进行子类化
- (void)sendEvent:(UIEvent *)event {
//NSLog(@"tap detect");
NSArray *allTouches = [[event allTouches] allObjects];
UITouch *touch = [[event allTouches] anyObject];
UIView *touchView = [touch view];
if (touchView && [touchView isDescendantOfView:<your webview>]) {
//
// touchesBegan
//
}
}
-(void)sendEvent:(UIEvent*)事件{
//NSLog(“抽头检测”);
NSArray*AllTouchs=[[event AllTouchs]AllObject];
UITouch*touch=[[event AllTouchs]anyObject];
UIView*touchView=[触摸视图];
if(touchView&&[touchView IsDescendaToView:]{
//
//接触开始了
//
}
}
问题2。我不知道您想通过访问触摸事件实现什么?我想制作页面翻译动画。