Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-13-2010, 10:39 AM   #1 (permalink)
Awesome
 
Esko2300's Avatar
 
Join Date: Jun 2009
Location: New York, N.Y.
Posts: 389
Esko2300 is on a distinguished road
Default Is there a way to grab html text and display it as a string

I need to be able to convert html text as it would be displayed on the webpage into a string on the ipad.

example
<B>BoldText</B> should look like
BoldText when it is being displayed on the iPad so how would i go about doing this?
Esko2300 is offline   Reply With Quote
Old 09-13-2010, 11:09 AM   #2 (permalink)
Registered Member
 
lukeinjax's Avatar
 
Join Date: May 2010
Posts: 125
lukeinjax is on a distinguished road
Default

Quote:
Originally Posted by Esko2300 View Post
I need to be able to convert html text as it would be displayed on the webpage into a string on the ipad.

example
<B>BoldText</B> should look like
BoldText when it is being displayed on the iPad so how would i go about doing this?
You can use a UIWebView:

Display Rich Text Using a UIWebView | iPhone Development Blog
lukeinjax is offline   Reply With Quote
Old 09-13-2010, 11:19 AM   #3 (permalink)
Awesome
 
Esko2300's Avatar
 
Join Date: Jun 2009
Location: New York, N.Y.
Posts: 389
Esko2300 is on a distinguished road
Default

how can i use a UIWebView to display a line of text?

ill go into my situation in more detail, i grab data from the server, on our main site customers have the option to fancy up their text using html. When the text is grabbed from the server it is grabed as html, so all i need to do is to be able to convert the text into its html form but im sure i need to use an nsstring cause it still needs to be displayed on the device. would it be logical to display a UIwebview for only about 3 sentences?
Esko2300 is offline   Reply With Quote
Old 09-13-2010, 11:22 AM   #4 (permalink)
Registered Member
 
lukeinjax's Avatar
 
Join Date: May 2010
Posts: 125
lukeinjax is on a distinguished road
Default

Quote:
Originally Posted by Esko2300 View Post
how can i use a UIWebView to display a line of text?

ill go into my situation in more detail, i grab data from the server, on our main site customers have the option to fancy up their text using html. When the text is grabbed from the server it is grabed as html, so all i need to do is to be able to convert the text into its html form but im sure i need to use an nsstring cause it still needs to be displayed on the device. would it be logical to display a UIwebview for only about 3 sentences?
It depends on how your application is laid out. It might be an option to create the entire view as a UIWebView, but it's hard to say without seeing what you are doing. Other than writing some type of parsing mechanism, UIWebView is the only way that I know of that will automatically take care of this type of formatting.
lukeinjax is offline   Reply With Quote
Reply

Bookmarks

Tags
html, string conversion

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 339
13 members and 326 guests
Absentia, cgokey, fiftysixty, givensur, heshiming, iGamesDev, linkmx, michaelhansen, mraalex, PixelInteractive, raihan.zbr, Trickphotostudios
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,657
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jenniead38
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:06 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0