• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UILabel with superscripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UILabel with superscripts


  • Subject: Re: UILabel with superscripts
  • From: Diederik Meijer | Ten Horses <email@hidden>
  • Date: Thu, 09 May 2013 14:12:41 +0200

Have you tried loading a NSAttributedString? It's iOS 6 only, a quick search implies you can set
kCTSuperscriptAttributeName to specific ranges in your string...


Verstuurd vanaf mijn iPhone

Op 9 mei 2013 om 14:04 heeft Koen van der Drift <email@hidden> het volgende geschreven:

> Right now I am using an UILabel with unicode symbols to show strings with superscripts, something like this:
>
>    NSInteger base = 2;
>    myLabel.text = [NSString stringWithFormat: @"%d\u00B2 = %d", base, base*base];
>
> But it kinda looks ugly in my opinion, the subscript is too low relative to the regular characters.  Maybe it's the font I'm using, which is the standard system font.  Are there alternatives? I read about using an UIWebView, but that seems a bit overkill for a simple string.
>
> Thanks,
>
> - Koen.
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >UILabel with superscripts (From: Koen van der Drift <email@hidden>)

  • Prev by Date: UILabel with superscripts
  • Next by Date: Re: Does initWithHTML:dataUsingEncoding:documentAttributes: run an event loop?
  • Previous by thread: UILabel with superscripts
  • Next by thread: Can scroll direction be changed programmatically?
  • Index(es):
    • Date
    • Thread