UITextView Word Wrap

Discussion in 'iOS Programming' started by ray648, Aug 23, 2010.

  1. macrumors regular

    Joined:
    Jan 10, 2008
    #1
    I've got an ipad app with a UITextView containing a lot of text. The default is that word wrap is on, and lines are always broken between words. Is there any way of making this a bit less clever? I want it to just break lines at the point they reach the edge of the TextView, in the middle of a word if thats where it happens. Anyone know of a way to achieve this?
     
  2. macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    Some of the UIKit views have a UILineBreakMode property, which you could set to UILineBreakModeCharacterWrap. As far as I can tell UITextView has no such property, including its base class and adopted protocols. I don't see any way to change the way it wraps text.

    If your text is not editable then you could use a UILabel.
     
  3. thread starter macrumors regular

    Joined:
    Jan 10, 2008
    #3
    Thanks. Guess I'll have to find another way to do it.
     
  4. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London

Share This Page