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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.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-02-2010, 11:04 AM   #1 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 60
Default UIWebView in UITableView Footer

Hey friends,

I am trying to create a UIWebView in UITableView footer. The table is grouped. Actually I am trying to create a hyperlink using UIWebView. For example there should be some text like

Hey folks Contact me

Contact me should be a hyperlink and I want to place this text in UITableView footer. I am unable to figure out how to do it..please guide me guys..if possible please post some sample code or please give me a link for the tutorial.. I didn't use IB here to create the webview..I just declared webview in .h file

This is the code I wrote in viewForFooterInSection method

Code:
CGRect webFrame = CGRectMake(20,500,buttonView.frame.size.width,buttonView.frame.size.height);  
		webView = [[UIWebView alloc] initWithFrame:webFrame];  
		webView.backgroundColor = [UIColor lightGrayColor];  
		[self.view addSubview:webView];  
		NSString *html = @"<html><head></head><body>Hey Folks Contact Us</br></body></html>";  
		[webView loadHTMLString:html baseURL:[NSURL URLWithString:@"http://www.example.com"]];

Last edited by racharambola5; 09-02-2010 at 11:12 AM.
racharambola5 is offline   Reply With Quote
Old 09-02-2010, 11:10 AM   #2 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,558
Send a message via ICQ to smithdale87 Send a message via AIM to smithdale87 Send a message via Skype™ to smithdale87
Default

What does your code currently product? Your HTML is screwed up for one thing...
smithdale87 is offline   Reply With Quote
Old 09-02-2010, 11:11 AM   #3 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 60
Default

It just shows a frame with nothing in it...If you dont mind can you please help me how to create a hyperlink?
racharambola5 is offline   Reply With Quote
Old 09-02-2010, 11:43 AM   #4 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,558
Send a message via ICQ to smithdale87 Send a message via AIM to smithdale87 Send a message via Skype™ to smithdale87
Default

Why even use a webview? Why not just a UIButton of type UIButtonTypeCustom and set the text to "Hey Folks contact us". Then, add you're click IBACTion that will open the contact uRL that you're after. Using button type uibuttontypecustom basically makes the button look like a hyperlink with blue text.
smithdale87 is offline   Reply With Quote
Old 09-02-2010, 11:50 AM   #5 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 60
Default

Yup I did that..but I don't want the entire text as hyperlink..I just want contact us to be hyperlink..so hey folks must be a text and contact us must be hyperlink..When I tried the way you suggested by making contact us as custom button and hey folks as a text label, it fails to display the label on the footer..it just displays the button..that's the reason I thought to implement a UIWebView
racharambola5 is offline   Reply With Quote
Old 09-02-2010, 12:20 PM   #6 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 60
Default

Yup I got it by creating custom buttons..thanks for all your help
racharambola5 is offline   Reply With Quote
Old 09-02-2010, 01:09 PM   #7 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: Memphis, TN, USA
Age: 24
Posts: 3,558
Send a message via ICQ to smithdale87 Send a message via AIM to smithdale87 Send a message via Skype™ to smithdale87
Default

Quote:
Originally Posted by racharambola5 View Post
Yup I got it by creating custom buttons..thanks for all your help
You're welcome.
smithdale87 is offline   Reply With Quote
Old 09-02-2010, 05:22 PM   #8 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 60
Default

Hey friend I have another problem..please check this thread and give me an advice to proceed further..

http://www.iphonedevsdk.com/forum/ip...tml#post241149
racharambola5 is offline   Reply With Quote
Reply

Bookmarks

Tags
hyperlink, iphone, objective-c, uitableview, uiwebview

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: 236
16 members and 220 guests
@sandris, ADY, dacapo, Dani77, djohnson, HemiMG, JasonR, MarkC, mer10, nibeck, prchn4christ, ryandb2, spiderguy84, timle8n1, tomtom100
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,228
Posts: 380,762
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

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