-1

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?

WendiKidd
  • 4,333
  • 4
  • 33
  • 50
fosstux
  • 11
  • 4

2 Answers2

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
0

Grab the unicode character

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?

Community
  • 1
  • 1
Jessedc
  • 12,320
  • 3
  • 50
  • 63