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 Tools & Utilities

Reply
 
LinkBack Thread Tools Display Modes
Old 08-02-2011, 03:22 AM   #1 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 30
cnmeyer1980 is on a distinguished road
Default How to put quotation " and returns in xcode

Hi everyone,

Now, this is probably quite a simple thing, however, i've looked on the web and reckon i must be typing in the wrong thing when I do my research, so, I'm just wondering if anyone can advise.

Does anyone know how you put quotation " marks and return in the body of xcode. Every time I do a " it effects the code as the " is a tag, and also, when I put a return in the text to make a new paragraph it makes the build fail?

Any ideas guys?

Example code below:

@"Although sometimes it might get you into trouble, your curiosity will reward you today. Light-hearted social encounters are nice, but you’ve been waiting for a more substantial conversation, and you should get ready for a nice surprise. Keep your eyes out for someone wearing %@ and %@. They’ll also have %@ and %@. This stranger might be your complete opposite in many ways, but will definitely compliment your great sense of humour and keep your conversation on track.", @"prediction"

Many thanks,

Chris
cnmeyer1980 is offline   Reply With Quote
Old 08-02-2011, 05:30 AM   #2 (permalink)
Registered Member
 
Join Date: Oct 2010
Location: Atlanta, GA
Posts: 148
tripp13 is on a distinguished road
Default

Quote:
Originally Posted by cnmeyer1980 View Post
Hi everyone,

Now, this is probably quite a simple thing, however, i've looked on the web and reckon i must be typing in the wrong thing when I do my research, so, I'm just wondering if anyone can advise.

Does anyone know how you put quotation " marks and return in the body of xcode. Every time I do a " it effects the code as the " is a tag, and also, when I put a return in the text to make a new paragraph it makes the build fail?

Any ideas guys?

Example code below:

@"Although sometimes it might get you into trouble, your curiosity will reward you today. Light-hearted social encounters are nice, but you’ve been waiting for a more substantial conversation, and you should get ready for a nice surprise. Keep your eyes out for someone wearing %@ and %@. They’ll also have %@ and %@. This stranger might be your complete opposite in many ways, but will definitely compliment your great sense of humour and keep your conversation on track.", @"prediction"

Many thanks,

Chris
For quotations, the only work around I know of is to use an apostrophy. For returns (i'm assuming you want the text to begin on a new line) use /n.
tripp13 is offline   Reply With Quote
Old 08-02-2011, 07:10 AM   #3 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 30
cnmeyer1980 is on a distinguished road
Default

Hi there,

Thank you for the above, using ' is a great idea, thank you for that suggestion.

Regarding the /n, i've put in the /n but nothing seems to happen? do I need it to be in ", for example "/n", if so, i've tried that and it unfortunately doesn't seem to work (again, i'm probably doing it wrong.

Cheers,

Chris
cnmeyer1980 is offline   Reply With Quote
Old 08-02-2011, 01:42 PM   #4 (permalink)
Nuisance Developer
 
Join Date: Jul 2009
Location: Italy
Posts: 4,691
dany_dev is on a distinguished road
Default

1- escape ", so @"this is a \"quote\"" produce this is a "quote"
2- a new line can be represented with \n, so @"first line\nsecond line" is the way...
__________________
dany_dev is offline   Reply With Quote
Reply

Bookmarks

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: 402
11 members and 391 guests
AppleDev, chemistry, Gi-lo, ipodphone, mistergreen2011, pipposanta, QuantumDoja, Retouchable, RobTaku, SLIC
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,129
Posts: 402,925
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

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