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 05-04-2010, 12:59 PM   #1 (permalink)
Human sponge
 
Join Date: Sep 2008
Location: London
Posts: 4
boy_plunder is on a distinguished road
Default How to combine a navbar title with a web address

Hi All,

I keep coming back to this, but don't seem to be able to see the light.

I have an app I am working on that has a database of entries in a SQLite database. When I click on an entry it shows the detail view with the name in the navbar. What I want to do is take that name and add it to a web address, like so:

www.website.com/entrynamehere

Can anyone be good enough to help me out here?
boy_plunder is offline   Reply With Quote
Old 05-04-2010, 01:07 PM   #2 (permalink)
A Single-Serving Friend
 
Join Date: Mar 2010
Location: Groningen, NL
Posts: 491
Robert Paulson is on a distinguished road
Default

Hi,

if I understand it correctly, the title of the current view controller appears in the navigation bar (also see here). So I guess this should work:

Code:
NSString *URL = @"www.website.com";
self.title = @"entrynamehere";
NSString *fullURL = [URL stringByAppendingString: [NSString stringWithFormat: @"/%@", self.title]];
NSLog(fullURL);
"self" refers to the view controller you are working with (in your case: the detail view). Good luck!

Cheers,
Bob
__________________
We are God’s middle children, according to Tyler Durden, with no special place in history and no special attention.

Consider saying thanks by buying my app. :]

Last edited by Robert Paulson; 05-04-2010 at 01:11 PM.
Robert Paulson is offline   Reply With Quote
Reply

Bookmarks

Tags
navbar, url string, web

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: 332
17 members and 315 guests
Abidullah, baja_yu, cgokey, Duncan C, Fstuff, gbenna, givensur, guusleijsten, jbro, mdpauley, n00b, newDev, Sami Gh, seokwon lee, SLIC, stanny, Steven.C
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,648
Threads: 94,113
Posts: 402,877
Top Poster: BrianSlick (7,990)
Welcome to our newest member, brandon6031
Powered by vBadvanced CMPS v3.1.0

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