The iPhone OS is pitched as the absolute Internet in your pocket…minus Flash. This works best of the time, but what if you aloof appetite to architecture a armpit or anatomy that looks like a congenital iPhone App?
This is area iWebKit comes in. iWebKit is a chargeless framework amalgamation for creating websites and applications that are optimized for the iPod Touch, iPhone & iPad. The aggregate of the framework is CSS3 which can assignment its abracadabra to makeover any abominable armpit and accomplish it attending fresh.
I will be accoutrement the web-form aspect of creating an optimized site, but iWebKit has abounding added appearance that can acquaint anon with the OS. Its affidavit is excellent, so dig about or analysis out the audience armpit on your iPhone to get inspiration.
When designing for the iPhone OS, you should use the iPhone actor accessible in the SDK to get an abstraction of area your architecture is heading. You can additionally use Safari to get a appealing aing representation, but annihilation beats appliance a absolute concrete device. It’s amazing how air-conditioned it feels and you absolutely do get the consequence it’s a congenital application.
Here is what the anatomy looks like on the iPhone afore we optimize it.
It’s appealing addled looking, to say the least. Below is the aboriginal HTML cipher actuality used. We’re activity to get Apple-blood active through it and accord it a makeover.
Baddest a Level of Education:<br /><select name=”education”><option value=”Jr.High”>Jr.High</option><option value=”HighSchool”>HighSchool</option><option value=”College”>College</option></select><br /><input type=”submit” name=”” value=”Submit” /></form></body></html>[/sourcecode]
This cipher needs to be in an HTML book in the aforementioned binder as the iWebKit framework. I alleged it index.html.
The aboriginal footfall is to add these curve amid the <head> tags.
To actualize the top appellation bar we charge to access the afterward cipher anon afterwards the <body> tag.
If you amount up the folio in your iPhone actor browser you will see this bar at the top.
Now we charge to alpha our capital agreeable with the afterward <div> tag.
All the anatomy fields will be central of this <div> and we won’t aing it till the end of the form. The aboriginal anatomy fields we appetite are the Name and Password fields.
Replace the aboriginal code:
Our Name and Password fields accept now been transformed.
The <ul> alembic represents the white box while the <li> tag is to announce abstracted sections central of the white box. You could additionally put anniversary of these fields in their own <ul> containers and they would attending like two abstracted boxes. To save awning space, I accumulation agnate items together. Now lets alter those old ancient radio ons from the Gender question.
The radio ons are afflicted for the better.
Next up are the checkboxes beneath the Favorite Food question.
Now instead of analysis boxes, we get those appealing on/off sliders we’re acclimatized to central the iPhone OS.
The textbox is appealing simple back it aloof creates a nice white box about the textbox.
Lets move on to the dropdown menus. Dropdowns consistently use the iPhone’s congenital adjustment and advice actualize the activity of a congenital app.
Notice the arrow amount chic adds the bottomward arrow to the appropriate of the alternative box.
As far as the anatomy goes, all that’s larboard is the Submit on and to aing the <div> tag.
Now aing the agreeable <div> tag with the following:
Finally, we may appetite to put a footer at the basal of our page. It’s nice to additionally abutment the iWebKit folks.
That’s it for the HTML portion. Two nice little touches you can do are for back addition adds the folio to their home screen. Back browsing the page, bang the “ ” on and baddest the Add to Home Awning option. You will see an figure that, by default, is a screenshot of the page. You can adapt this by authoritative your own 58×58 pixel angel and apropos to it in the <head> section. Abundance is alleged homescreen.png and I’ve already included the cipher at the alpha of the article.
Now back this folio is added to the Home Screen, it will attending and feel like a congenital app. Why not accept a startup awning displayed while the folio loads? iWebKit additionally has this affection and you artlessly charge a 320×460 pixel angel that again, is referenced in the <head> section. I accept alleged abundance startup.png.
That’s it, we’re done! iWebKit has abounding added appearance that you should analysis out. You may get some afflatus for an app or at atomic attending acceptable to your bang-up back you appealing up that old anatomy that’s been about for years. All the files acclimated in this commodity are additionally absorbed for your examination amusement forth with a abbreviate video walkthrough of this tutorial.
Project Files: iwebkit-tutorial-files.zip (94 KB, ZIP)
6 Facts That Nobody Told You About Create A Free Application Form | Create A Free Application Form – create a free application form
| Welcome in order to my own blog site, in this particular moment I’ll explain to you concerning create a free application form