怎么让webview长按不弹出菜单栏
1个回答
展开全部
解决方法如下:
[objc] view plain copy
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
//修复bug:第一次长按 不弹出复制菜单
[[_webView.scrollView.subviews firstObject] becomeFirstResponder];
[[NSOperationQueue mainQueue] addOperationWithBlock:^{
[self becomeFirstResponder];
}];
[objc] view plain copy
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
//修复bug:第一次长按 不弹出复制菜单
[[_webView.scrollView.subviews firstObject] becomeFirstResponder];
[[NSOperationQueue mainQueue] addOperationWithBlock:^{
[self becomeFirstResponder];
}];
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询