small medium large xlarge

04 Jan 2011, 18:27
Ric Levy (21 posts)

Hi Tim,

I think I just found an error in Chapter 8 (the ePub version, so this could just be to do with how it renders the text on my iPad screen).

In 2 code examples, the book references the line:

IBOutlet NSTextField *newItemName-TextField;


but it doesn’t work unless you remove the hyphen:

IBOutlet NSTextField *newItemNameTextField;


(looking more carefully, I think it’s just iBooks adding hyphens when the line overspills. But only a few overspilling lines have hyphens. Is there some “don’t do hyphens” code in the ePub file that’s missing on this occasion?)

05 Jan 2011, 14:13
Tim Isted (105 posts)

Thanks, Ric, I’ll pass this on to the production team - indeed there shouldn’t be any hyphens in code (a hyphen will confuse the compiler and the project will fail to build).

05 Jan 2011, 14:57
Dave Thomas (389 posts)

Unfortunately, the new iBooks hyphenates, and I can’t find a way to stop it doing it to code.


05 Jan 2011, 17:11
Ric Levy (21 posts)

I’ve found a workaround, although it’s something the user has to do. Just go to Settings>iBooks and set Full Justification and Auto-Hyphenation to “Off”.

It would be nice if Apple supplied a way to override the auto-hyphenation, although there is at least a hack to get around the Justification:

You must be logged in to comment