Can I create iphone app (IOS) using web's languages ( HTML - CSS - jQuery )?

本秂侑毒 提交于 2020-07-05 03:24:31

问题


Can I create iphone app (IOS) using web's languages ( HTML - CSS - jQuery ) ? How can I star that ?


回答1:


There are a number of different approaches you can take.

First, there's creating iPhone WebApps. This approach give you a number of different Mobile Safari APIs that expose internal capabilities through the Safari Browser.

Second, you can create a native application that contains a UIWebView. Other than this detail, the approach would be the same as the first, exclusively using the APIs for Mobile Safari.

Lastly, you can take an approach of using a third-party SDK, like Titanium or PhoneGap. This approach gives you a base set of APIs that you leverage for not only making iPhone webapps, but an app that works on other mobile platforms as well.

Good luck!




回答2:


For create a Games you can use GameSalad or Stencyl, have own code very simple.

For Utility, use Titanium or PhoneGap using HTMLcode jQuery, jQTouch

Or you can use xcode:

1) create your webApp using you prefer software, during the process you can testing on the iPhoneSimulator simple to drang and drop index file inside the simulator.

2) open Xcode and create a single view application.

3) in the first view of your app by interface builder add a full screen UIWebView.

4) drag and drop the root folder of your webApp in your project and copy a folder:

enter image description here Make sure to creare a Folder and not a Group.

5) implement your ViewController.h:

@interface HTMViewController : UIViewController {

    UIWebView *homePage;
}

@property (nonatomic, strong) IBOutlet UIWebView *homepage;

6) and your ViewController.m

@synthesize homepage;

- (void)viewDidLoad
{
    [super viewDidLoad];
    NSString *htmlFile = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html" inDirectory:@"MyFolder"];

    NSData *htmlData = [NSData dataWithContentsOfFile:htmlFile];
    [homepage loadData:htmlData MIMEType:@"text/html" textEncodingName:@"UTF-8" baseURL:[NSURL URLWithString:@"index.html"]];
}

7) from interface builder link the web view to a reference, and setting the UI has you want.

Like remove bounce, detect address, phone numbers, link ext.

Now you have integrated your web app in a native project ;)

Hope this help.

pls vote if you think my contribute is good.




回答3:


Your could use Phonegap. Ars Technica's own iPad app was made with it.




回答4:


Yes, you can. You would do this by making a webpage, and attaching that webpage to a UIWebView. You will still need Xcode and other iOS developer tools to work the minimal code you need to write. Take a look at developer.apple.com for information on how to get these things and on how to write simple webview code.




回答5:


Yes it is possible using phonegap and I was searching the internet for the same and found out this



来源:https://stackoverflow.com/questions/4908970/can-i-create-iphone-app-ios-using-webs-languages-html-css-jquery

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!