Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

How to underline Text???

MaCeXpErToMaCeXpErTo Posts: 149Registered Users
edited December 2011 in iOS SDK Development
How do you underline text? Like in UITextView?

So for example @" abc "

How would you underline that?

Thanks
Post edited by MaCeXpErTo on
"I love this place"
· ·

Replies

  • SteapsSteaps Posts: 469Tutorial Authors, Registered Users
    edited October 2008
    Although i am a beginner at this, i don't think you can. I could be wrong. But there is no underline option in the show fonts in the IB, or in UILabel no underline documentation.
    They do have strike through so if there was underlining, I'm sure it would be there.
    You could just make a UIImageView and change the colour to your text colour and make a fake underline. Lol.
    <div align="center"><b><a href="http://itunes.com/apps/quickevade" target="_blank">Evade - iPhone Game</a><br />
    <a href="http://itunes.com/apps/itasks" target="_blank">iTasks - Task Manager/Todo List</a><br />
    <a href="http://steaps.techaos.com/" targe
    · ·
  • erotsppaerotsppa Posts: 357Registered Users Noob
    edited October 2008
    you cant do that.
    · ·
  • SteapsSteaps Posts: 469Tutorial Authors, Registered Users
    edited October 2008
    <div align="center"><b><a href="http://itunes.com/apps/quickevade" target="_blank">Evade - iPhone Game</a><br />
    <a href="http://itunes.com/apps/itasks" target="_blank">iTasks - Task Manager/Todo List</a><br />
    <a href="http://steaps.techaos.com/" targe
    · ·
  • MaCeXpErToMaCeXpErTo Posts: 149Registered Users
    edited October 2008
    I know you can underline because I've seen plenty of apps use a UITextView with underlined text. so I know it's possibly and it's not faked out.

    @PhoneyDeveloper
    Thanks for the link, pretty helpful.
    "I love this place"
    · ·
  • mcurtismcurtis Posts: 44Registered Users
    edited October 2008
    There's no support for attributed strings in the current SDK. At least not that I'm aware of. If you only need to display the underlined text, then you can use a UIWebView and underline using CSS or HTML.
    <a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=294442217&mt=8" target="_blank">Memos</a> - Easily create, organize & share text documents.<br />
    <br />
    <a href="http://www.bluemarblesoftware.com" target="_blank">Blue
    · ·
  • MaCeXpErToMaCeXpErTo Posts: 149Registered Users
    edited October 2008
    mcurtis wrote: »
    There's no support for attributed strings in the current SDK. At least not that I'm aware of. If you only need to display the underlined text, then you can use a UIWebView and underline using CSS or HTML.

    Yeah, that's what I think you have to do... Use a UIWebView.
    "I love this place"
    · ·
  • GehanGehan Posts: 2New Users
    edited October 2009
    Steaps wrote: »
    Although i am a beginner at this, i don't think you can. I could be wrong. But there is no underline option in the show fonts in the IB, or in UILabel no underline documentation.
    They do have strike through so if there was underlining, I'm sure it would be there.
    You could just make a UIImageView and change the colour to your text colour and make a fake underline. Lol.

    I've been looking for a way to get a strike-through but haven't found it yet. Would you mind telling me how I can get struck-through text in a UILabel?
    · ·
  • gammapointgammapoint Posts: 12Registered Users
    edited February 2010
    MaCeXpErTo wrote: »
    How do you underline text? Like in UITextView?

    So for example @" abc "

    How would you underline that?

    Thanks

    UILabel has both strikethrough & underline feature. See via IB -> UILabel-> attributes -> Font -> Top first 2 buttons are about it.
    · ·
  • AnjuElanAnjuElan Posts: 3New Users
    edited December 2011
    gammapoint wrote: »
    UILabel has both strikethrough & underline feature. See via IB -> UILabel-> attributes -> Font -> Top first 2 buttons are about it.

    ya I have seen it has but they are not working, how do they work
    · ·
Sign In or Register to comment.