Posts

Post not yet marked as solved
1 Replies
500 Views
I have been searching a lot on using the decimalPad as the UIKeyboardType while using Webkit and WKWebview. I understand it is not possible to call out the decimalpad using the HTML as it is unfortunately limited. However, is it possible to call out the decimalPad from within the view controller while using the Webkit and WKWebview? As in, any input keyboard is forced to use the decimalPad?i have a calculation app and although it is in the instructions it is the most frequent confusion because the default numeric keyboard does not have a decimal point, the users have to hit +*# and then use the * as the decimal point. This is not very intuitive and frequently confusing.I tried adding the UIKeyboardType and set it as the decimal pad but it says it is unused. The build runs but the keyboard does not change to a decimalPad.Below is the link I referenced, the decimalPad option is what I am trying to force in the webview. Is it possible? https://developer.apple.com/documentation/uikit/uikeyboardtypeThank you,Heath
Posted Last updated
.
Post marked as solved
13 Replies
6.1k Views
Hello, I've been searching all over for this for days and I can't find the solution as I'm kind of illiterate with code so I have been reading and watching tutorials. Anyway, I have a webapp I created that is in HTML, CSS, and javascript. I have all the local files as I want it built-in to my xcode project. I am having trouble getting the code to work and this is what I have in the ViewController.swift All I am trying to do it make a simple app that can interact with my javascript using WKWebview tool.This is what i have came up with and tried several things but no matter what I get a "SIGABRT" error. I think I am not telling it correctly where my files are located? Can someone please help? I have searched all over the web and apple documentation but since I don't know the code I don't really understand the language of what I am doing wrong. I tried looking at all the sub link apple documention and it shows you what to use but not really how to use it. So I feel like I am using it wrong...import UIKitimport WebKitclass ViewController: UIViewController { @IBOutlet weak var loadhtml: WKWebView! override func viewDidLoad() { super.viewDidLoad() let webView = WKWebView() let htmlPath = Bundle.main.path(forResource: "index", ofType: "html", inDirectory: "www") let htmlUrl = URL(fileURLWithPath: htmlPath!) let request = URLRequest(url: htmlUrl) loadhtml.load(request) webView.loadFileURL(htmlUrl, allowingReadAccessTo: htmlUrl) view = webView } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } // Do any additional setup after loading the view.}I have a "www" folder I added to the main file that has the index.html file in it along with a javascript file and also subolders with the images, CSS, etc..I am getting frustrated trying to fix it. Thank you in advance...
Posted Last updated
.