Is it possible to create HTML lists such as ordered and unordered lists without using UIWebView?
Thanks
You need a UIWebView to display/interpret html, unless of course you want to write your own implementation to parse html and display it (but why would you?). If on the other hand you are just trying to display lists without needing html, you can use a UITableView.
Related
I am going to show a mobile version of wikipedia page in my app.
The easiest way is to use UIWebView to show mobile view page, e.g. https://en.m.wikipedia.org/w/index.php?title=White_House
However I want to make certain changes to the page:
Remove the search bar.
remove all external links in the page.
while keep all format/image/layout unchanged.
I did some search. Seems I have to retrieve all contents in json with wikipedia API and reformat everything by myself.
Any easier way?
You can load the HTML, make "Find and replace" and remove whatever you want. (Modify the HTML itself.
After that you can load the HTML into the UIWebView.
Note: This might break when wikipedia will change it's webpage structure...
I'm using titanium webviews to open an internal html page that I need to internationalize. This seems a rather basic need, but I can't seem to find the right documentation on how to accomplish it. This guide (https://wiki.appcelerator.org/display/guides2/Internationalization) points out how to use internationalization from app.js, but as I need to have it in my html I was wondering on the best way to do it. I was thinking on grabbing the onload event and populate the html with translated strings, but then, how do I obtain the html elements that should be translated? From my investigations it seems that I cannot use jQuery dom manipulation from within app.js..
Any help?
I've not written an iOS app and want to know if what I want to do is reasonably easy before I invest all my time in it. The idea is simply to leverage the built-in webkit methods to write my own browser. I've seen tutorials where this is done fairly easily. However, the twist is I want to apply some rewrite/regex rules prior to the page rendering. ie, you load http://example.com which is a page containing the word 'foo'. Prior to displaying the page, the app rewrites 'foo' to 'bar' and renders.
Is this possibly to do easily without actually writing a ground-up browser?
Thanks!
It's doable (assuming you're using the standard UIWebView component to render the page), and there are a few ways you could go about it. Among them:
You could download the HTML and parse it via Objective-C string handlers before loading it into the UIWebView
You coud use load the HTML as-is and use the UIWebview's stringByEvaluatingJavaScriptFromString: message to "inject" javascript onto the page, manipulating the DOM itself
You could go the Opera route, and pre-render the page via a server-side proxy before downloading it to the client.
How far down the rabbit hole you want to go would be up to you, of course. Easy is in the eye of the beholder.
I am unable to decide whether what to use for my blackberry application.
I am developing an application for Blackberry Device. This application send and recieves data from website.
Thats the only functionality.
I wanted to know what the best approach to go with.
Shall i use BrowserField and display html in the application??
OR
Shall i develop the custom controls and update the UI with the data fetched from the web??
Please Suggest, advice.
thanks
SIA
If you don't need to change html, and html is simple enough, it's better to use BrowserField. You will be able to natively represent text and images in html formatting. Even if you go offline you can init it with stored html. Also, you can extract a part of response and use it with BrowserField.
On the other hand, if custom formatting or interactivity is needed, its better to use RIM UI controls.
Is there any way to keep search engines from indexing text ads?
These are basically stylized links.
I have thought about generating images with text or using javascript to write them into a DIV.
What is the best and most accepted way?
One way is to use iFrames to show the ads, and use meta tags in them to tell Google not to index them.
Another way would be to use JavaScript to print the ads, so they would not be there when the browser does not support JavaScript (Google Bot doesn't execute JavaScript).
A lot of ad systems use the JavaScript one, but I don't really know if that's the best way to do it - but it's a way.