I need to insert the ®
character as a superscript into the title bar of an app for the iPad. How can this be done in XCode?
Asked
Active
Viewed 1,689 times
-1
2 Answers
1
As of iOS 5.x, you can't set text attributes like bold, superscript, etc. on individual characters within a label's text. (This includes the builtin labels of navigation bars.)
You can just insert the ® character in your string (you can type it on a US Mac keyboard with option-R, or use the escape code as in Jessedc's answer). Whether it appears small and superscript depends on the font used for the label -- some fonts make that symbol appear as such already, others make it larger and baseline-aligned.

rickster
- 124,678
- 26
- 272
- 326
-
Love the slight hint given by "as of iOS 5.x" ;) – Cyrille Aug 07 '12 at 05:54
0
put it in a string
NSString *string = @"\u00AE"; //this is your (r)
Nearly a duplicate of How do I escape a Unicode character in my Objective-C source code?