News for hackers. Stuff that matters.
Re:Surprises When Designing An iPhone App by 10dpd on Tuesday December 11, 2012 @12:37PM (#4905576)
"there must be an iOS equivalent of the <strong> tag, right? Apparently not."

Just use three labels, with the middle label set to bold.

Re:Surprises When Designing An iPhone App by unwind on Tuesday December 11, 2012 @12:53PM (#4905686)
Doesn't that make you "too" responsible for the spacing? Is it as easy to get the distance between two labels to be exactly one space? Or can you include trailing/leading spaces in the strings, and have them automatically laid out?

Note: I (obviously) don't program for iOS, but the above recommendation would be non-trivial in the toolkit I know best (GTK+) which is why I'm curious.

Re:Surprises When Designing An iPhone App by div on Tuesday December 11, 2012 @01:49PM (#4906040)
It does. Starting from iOS 6, UILabels can display attributed strings out of the box. If you need to support iOS < 6, the best approach is to use TTTAttributedLabel or NIAttributedLabel.
Re:Surprises When Designing An iPhone App by bennyg on Tuesday December 11, 2012 @03:15PM (#4906564)
Sure it makes you responsible, but this is a very, very easy solution to the problem. Obviously, for dynamically iterating, an NSAttributedString is the "best" solution.

You just line them up in interface builder and use your eyes and the arrow cursor to get it right. For static text on a non-changing screen like this, this solution is probably the best.

Re:Surprises When Designing An iPhone App by chrisdevereux on Tuesday December 11, 2012 @01:04PM (#4905761)
In iOS 6 at least, UILabel supports attributed strings. I have no idea what took so long either.
Re:Surprises When Designing An iPhone App by potatolicious on Tuesday December 11, 2012 @02:20PM (#4906235)
Or, really, how thick the API is around it. Attributed strings won't see very wide adoption until someone (preferably Apple?) gives us an easy to use markup language around it.

Manually screwing around with NSRange's is not the way forward.

Re:Surprises When Designing An iPhone App by duopixel on Tuesday December 11, 2012 @12:54PM (#4905693)
If the app were to be displayed in other language it would mess up the word spacing.
Re:Surprises When Designing An iPhone App by muzzamike on Tuesday December 11, 2012 @04:51PM (#4907052)
At least you wouldn't need a new image for each new language.