uiactionsheet


Disable WKActionSheet on WKWebView


I'm migrating an iOS app form UIWebView to WKWebView. So far so good... In the previous app I disabled long press and implemented a custom long press (to do custom handling of links), however I can't get this working in the WKWebView
I've tried the following:
- (void)webView:(WKWebView *)wkWebView didFinishNavigation:(WKNavigation *)navigation {
[wkWebView evaluateJavaScript:#"document.body.style.webkitTouchCallout='none';" completionHandler:nil];
}
I've checked and that line gets executed, the response of the call is #"None"
But it responds with:
Warning: Attempt to present on whose view is not in the window hierarchy!
Any ideas?
SOLUTION:
Inject javascript into wkwebview now works!
[self.wkWebView evaluateJavaScript:#"document.body.style.webkitTouchCallout='none';" completionHandler:nil];

Related Links

Attachment action sheet hidden behind keyboard in iOS 9
Use of Actionsheet in Ionic 2
Disable WKActionSheet on WKWebView
Action sheet programatically [closed]
unrecognized selector sent to instance UIActionSheet
Using Viewcontroller to control tabbarController
ShareKit 2.0: how to add a custom NON-SHARE item in action sheet?
Fire UIActionSheet in ViewDidLoad first load only
Setting bounds for UIActionSheet?

Categories

HOME
android
fuelux
redux-form
phpmyadmin
jmx
oracle-apex-5
sh
sitecore
rds
mapbox
iis-6
data-visualization
cmdb
favicon
gruntfile
azure-iot-hub
scsi
template-engine
html5-appcache
jmp
enterprise-miner
boost-icl
apache2.4
google-maps-autocomplete
squashfs
spring-async
dpdk
backpack-for-laravel
dataflow-diagram
imageresizer
event-store
highstock
google-api-client
interbase
motion-detection
flooding
fragment-backstack
has-and-belongs-to-many
outliers
8051
intersystems-cache
winexe
corenlp-server
memory-address
wacom
code-snippets
openwhisk
baidu-map
swagger-php
reason
graphhopper
release
signals-slots
setup.py
comparison-operators
branching-and-merging
ssrs-2014
vaadin-elements
context-switch
modelsim
java-6
flyout
ampps
testrail
cvxpy
reporting-services-2012
qtplugin
async.js
flex4.6
delta
cassia
database-relations
contentcontrol
jbase
dynamics-nav-2016
opl
evolus-pencil
atoi
uncompress
google-refine
mruby
jama
build-script
mintty
file-not-found
syndicationfeed
ora-06550
sphinxql
mysql-error-1044
isqlquery
windows-phone-8-sdk
workitem
flex++
poker
scmmanager
abstract-data-type
dolby-audio-api
android-icons
http-status-code-410
vfs
faye
listitem
ilasm
koken
apache-commons-dbutils
google-maps-mobile
gobject-introspection
expression-blend-4
rmdir
umra
cuteeditor
objective-j
timertask
facebook-iframe
maven-1
easyb
jqueryform
web-garden
opml
pos-for-.net
skype4java
lalr
sun
asynchronous-wcf-call
online-storage

Resources

Encrypt Message