Hi All,
I am trying to figure out how to do an extension for a html file. I'm new to coding and Xcode and trying to create an app but I have enough experience in coding to understand what goes where and why.
The problem I'm facing is that I need to add an extension to a html file; example (index.html?lc=uk) instead of (index.html).
I've created a interface and all the other information required but I can't seem to get this part to work. The coding I'm using on the ViewController.m is;
I've tried adding to the (pathForResource) @"index.html?lc=uk" but when I test the app it doesn't work and gives me an error.
Can someone give me a idea on what I need to do?
Kind Regards,
Seb
I am trying to figure out how to do an extension for a html file. I'm new to coding and Xcode and trying to create an app but I have enough experience in coding to understand what goes where and why.
The problem I'm facing is that I need to add an extension to a html file; example (index.html?lc=uk) instead of (index.html).
I've created a interface and all the other information required but I can't seem to get this part to work. The coding I'm using on the ViewController.m is;
Code:
[super viewDidLoad];
NSString *path = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:@"354"];
NSURL *url = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[webview loadRequest:request];
I've tried adding to the (pathForResource) @"index.html?lc=uk" but when I test the app it doesn't work and gives me an error.
Can someone give me a idea on what I need to do?
Kind Regards,
Seb