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 Tutorials > Tutorial Requests

Reply
 
LinkBack Thread Tools Display Modes
Old 04-03-2009, 12:10 PM   #1 (permalink)
New Member
 
Join Date: Apr 2009
Posts: 3
Default URGENT: Website Search Application

Hi,

I have started iPhone development few days back. I am planning to make a native application that can search a website an display the results. I am not able to find any tutorial on how to customize the search bar. I mean if I want the application to search for a keyword on google, then how do I do that?

I have gone through all the forums and tutorials.... Can't find it... Maybe its too easy for others, but I am not able to get it.... Please help me.....

Thank You
tyagi.anuj is offline   Reply With Quote
Old 04-10-2009, 10:05 PM   #2 (permalink)
Beast Mode
 
Join Date: Dec 2008
Age: 21
Posts: 1,890
Default

why dont you make your own "search bar"
__________________
I really do this.
Bertrand21 is offline   Reply With Quote
Old 04-23-2009, 05:47 PM   #3 (permalink)
New Member
 
Join Date: Apr 2009
Posts: 3
Default

Quote:
Originally Posted by Bertrand21 View Post
why dont you make your own "search bar"
Thats what i want to do. I just want to know how do I add the search term at the end of the URL......
tyagi.anuj is offline   Reply With Quote
Old 04-25-2009, 09:56 PM   #4 (permalink)
Beast Mode
 
Join Date: Dec 2008
Age: 21
Posts: 1,890
Default

its pretty simple. lets take google for example...
Code:
NSString *mainGoogle = [NSString stringWithFormat:@"http://www.google.com/search?hl=en&safe=off&q=%@&btnG=Search", searchText.text];
	NSString *seachWordsGoogle = [mainGoogle stringByReplacingOccurrencesOfString:@" " withString:@"+"];
	addressBar.text = [NSString stringWithFormat:@"%@", seachWordsGoogle];
so say i search for "Iphone Application Tutorials"
it takes that text and replaces " "(spaces) with "+" which is how google does it in the URL.

and then it takes that text and places it in the
Code:
http://www.google.com/search?hl=en&safe=off&q=%@&btnG=Search
so it comes out like
Code:
http://www.google.com/search?hl=en&safe=off&q=Iphone+Application+Tutorials&btnG=Search]
and then have a webview or something and send the url to that.
__________________
I really do this.

Last edited by Bertrand21; 04-25-2009 at 09:58 PM.
Bertrand21 is offline   Reply With Quote
Old 04-26-2009, 04:04 PM   #5 (permalink)
New Member
 
Join Date: Apr 2009
Posts: 3
Default

Thank a lot for such a detailed explaination. I found a way to do it but your reply helped me understand the whole search process very well. Thank you again. Appreciate your help.
tyagi.anuj is offline   Reply With Quote
Reply

Bookmarks

Tags
application, iphone, urgent, website search

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: 316
19 members and 297 guests
@sandris, ADY, dacapo, Dani77, djohnson, dre, HDshot, HemiMG, JasonR, MarkC, mer10, nibeck, prchn4christ, ryandb2, spiderguy84, timle8n1, tomtom100, vogueestylee
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,229
Posts: 380,763
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:05 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0