My iPhone app got rejected saying I am trying to load lot of HTML on UIWebView
with the help of XML. They asked me to use native UI Views. Can anyone let me know how can I convert HTML tags into to native UIView
?

- 106,943
- 21
- 217
- 235

- 516
- 1
- 3
- 11
3 Answers
They may have meant, you parse your XML and show your data in some format in a native view like UITableview...

- 1,120
- 6
- 13
-
some time i will get a text with images and some time text with pointer..Can UITextView handle all this – pradeepj Dec 25 '12 at 11:53
-
No... UITextView cannot handle Images.. you would need to add image views to display images.. For text, UITextView is fine. – Akshay Shah Dec 25 '12 at 11:55
-
You can create different table cells as per your need and use and display the appropriate as per data. – Akshay Shah Dec 25 '12 at 11:56
There is not straightforward way to do that. What the meant is to convert your web view to a standart UIView.
You may consider using a UITextView
, using the rich text features available in iOS 6, to present the data parsed from XML.
In order to preserve the same formatting as the original web view you should use a NSAttributedString
(check out this question for more information about it).
In order to insert images you can use the approach described here, however if you need to interleave images I'm afraid you cannot do that within a single UITextView
.
For bullet point lists you can use the approach described here.

- 1
- 1

- 106,943
- 21
- 217
- 235
-
some time i will get a text with images and some time text with pointer..Can UITextView handle all this – pradeepj Dec 25 '12 at 11:52
-
one of my Sr. iPhone Developer said get APIs to do this...but i dont understand this!!..do you mean what he is trying to say? – pradeepj Dec 25 '12 at 11:57
-
one of my Sr. iPhone Developer said get APIs to do this...but i dont understand this!!..do you mean what he is trying to say? – pradeepj Dec 25 '12 at 12:00
Can any one let me know how can I convert HTML tags into to native UI View?
That's not possible. Maybe use a UITableView
to display possible articles and is you click one you show a new UIView
with the detailed content.
Maybe you should add some detailed info about the app and about the way you want reach some functions?
They asked me to use native
UIView
.
This probably mean you're actually creating a Web-Application which is not the same as a "real" App. They could think you just do too much with HTML/CSS/Javascript
Maybe read the iOS Human Interface Guidelines... e.g. the "back"-button is on the "wrong" side. (Should be left.) Apple would like to see that each iOS Apps have the same look an feel, which is easier to understand.
Update: You could use a UIView
with a native UINavigationBar
and a native UIToolBar
and display only the content in a UIWebView
.

- 8,219
- 5
- 44
- 74
-
-
one of my Sr. iPhone Developer said get APIs to do this...but i dont understand this!!..do you mean what he is trying to say? – pradeepj Dec 25 '12 at 12:04
-
-
by using the native tools, but had a background images for all thats it – pradeepj Dec 25 '12 at 12:09
-