Questions tagged [uitextview]

The UITextView class implements the behavior for a scrollable, multiline text region in iOS. The class supports the display of text using a custom font, color, and alignment and also supports text editing. You typically use a text view to display multiple lines of text, such as when displaying the body of a large text document.

The UITextView class implements the behavior for a scrollable, multiline text region. The class supports the display of text using custom style information and also supports text editing. You typically use a text view to display multiple lines of text, such as when displaying the body of a large text document.

Before iOS 6 () the text could only be styled as a whole, since then the view supports finer grained control of the text style through the .attributedText property.

References:

UITextView Class Reference

5806 questions
36
votes
10 answers

Scroll UITextView To Bottom

I am making a an app that has a UITextView and a button. When I click the button some text will add in the UITextView. But when clicking the button, I wan't to scroll down to the bottom of the text field so the user can see the last text…
Jonis
  • 415
  • 2
  • 6
  • 7
34
votes
4 answers

Detect Start and Stop Editing UITextView

How can I call some code upon entering a UITextView (user taps to edit it) and leaving the view (user taps to leave it)? Appreciate any help.
Josh Kahane
  • 16,765
  • 45
  • 140
  • 253
34
votes
3 answers

UITextView font is nil

I created a UITextView with a font size of 14 in a storyboard and hooked it up to the detailDescriptionLabel property of my ViewController. This code is in viewDidLoad: self.detailDescriptionLabel.font=[UIFont systemFontOfSize:10]; NSLog(@"text is…
L D
  • 339
  • 3
  • 3
34
votes
1 answer

How can I set the color and alignment of attributed text in a UITextView in iOS 7?

The formatting of my textViews worked fine in iOS 6, but no longer in iOS 7. I understand with Text Kit much of the under the hood stuff has changed. It's become really quite confusing, and I'm hoping someone can help straighten it out a bit by…
Joe
  • 854
  • 3
  • 11
  • 21
33
votes
6 answers

How to set the position of the cursor in UITextView

I have an UITextView in my iPhone app which is editable. New button is created inside the UITextView whenever user select a specific function. As the button is always placed on the left side in the text view, I need to position the cursor on the…
GURU
  • 565
  • 2
  • 7
  • 11
33
votes
2 answers

How to support dynamic type in labels in iOS 7?

How do I support Dynamic Type in UILabel and UITextView in iOS 7? I'm adapting one of our projects for iOS 7 and would like to support this accessibility feature. I can't find the specific how to tutorial on it on Apple's iOS Developer site.
jaytrixz
  • 4,059
  • 7
  • 38
  • 57
33
votes
9 answers

Is it possible to change color of single word in UITextView and UITextField

Is it possible to change color of single word in UITextView and UITextField ? If i have typed a word with a symbol infront (eg: @word) , can it's color be changed ?
Nithin M Keloth
  • 1,595
  • 1
  • 20
  • 37
33
votes
4 answers

Get the frame of the keyboard dynamically

Is it possible to get the frame, actually its height, of the keyboard dynamically? As I have a UITextView and I would like to adjust its height according to the keyboard frame height, when the input method of the keyboard is changed. As you know,…
lu yuan
  • 7,207
  • 9
  • 44
  • 78
32
votes
4 answers

Border around UITextView

How do you add a border around a UITextView (like a UITextField)? I want to allow users to type multiple lines, but unfortunately a UITextField does not support this. Is there an easy way to do this in code or do I need to create one in Photoshop?
Jack
  • 361
  • 1
  • 4
  • 6
32
votes
2 answers

change uitextview hyperlink color

I am using UITextView and i want to change the color of hyperlink which i use in this component. For example if UITextView is showing www.gmail.com then it shows up in blue color. I want to change that color.
Muzamil Hassan
  • 841
  • 1
  • 11
  • 23
32
votes
12 answers

how to know when text is pasted into UITextView

What event is fired when a block of text is pasted into a UITextView? I need to modify the frame of my textView when the text is pasted in. Thanks for reading.
OWolf
  • 5,012
  • 15
  • 58
  • 93
31
votes
5 answers

Is there an iPhone equivalent to the NSTokenField control?

In my app I want the user to type names into a UITextField (or equivalent) and then when they press return, it will put that word(s) in a blue bubble that's usually associated with tags. The cursor then moves to the end where they can add more…
Michael Waterfall
  • 20,497
  • 27
  • 111
  • 168
30
votes
4 answers

Getting cursor position in a UITextView on the iPhone?

We have a UITextView in our iPhone app which is editable. We need to insert some text at the cursor location when the users presses some toolbar buttons but can't seem to find a documented (or undocumented) method of finding the current location of…
user74686
  • 301
  • 1
  • 3
  • 3
30
votes
5 answers

Swift Increase font size of the UITextview,how?

I am trying to add two buttons to my app to set the font size of a UITextview,and i found this function textview.font.increaseSize(...) //and decreaseSize(...) But i don't understand what I have to put inside the parentheses,i want to increase and…
GioB
  • 973
  • 3
  • 11
  • 17
30
votes
14 answers

Get UITextView dynamic height with auto layout after setting text

I have a UITextView not scrollable with auto layout set by interface builder, and the text increase or decrease dynamically with no problem, but i want know what is the new UITextView height after setting text, i'm trying to do this: NSLog(@"text…
Piero
  • 9,173
  • 18
  • 90
  • 160