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
14
votes
5 answers

UITextView textContainer exclusion path fails if full width and positioned at top of textContainer

In iOS 8, I'm trying to add a UIImageView as a subview of a UITextView, similar to what's shown here - but with the text below the image. I want to do it using an exclusion path because on other devices, I might position the image differently…
Jim Rhoades
  • 3,310
  • 3
  • 34
  • 50
14
votes
7 answers

Is there a delegate call for when the text is changed on a UITextView?

When I set my UITextView programmatically like this: [self.textView setText:@""]; The delegate method textViewDidChange: does not get called. Is there a way I can find that without making a UITextView subclass?
SirRupertIII
  • 12,324
  • 20
  • 72
  • 121
14
votes
1 answer

Swift - CGAffineTransformInvert: singular matrix. UITextView & iAd

I have View Controller with UITextView and in the bottom I have iAds. When I access the View Controller I get an error: : CGAffineTransformInvert: singular matrix. Why? Everything works fine, but when I change from Portrait to Landscape or…
Bogdan Bogdanov
  • 882
  • 11
  • 36
  • 79
14
votes
3 answers

How to disable UITextview selection text, copy/paste UIMenuController but still have hyperlinks working [Not duplicate]

I want to disable copy/paste menu and i'm using HTML tag in UITextView in which multiple hyperlinks and want to only disable menu. My texview image
Umer Afzal
  • 371
  • 1
  • 2
  • 18
14
votes
1 answer

UITextView KeyboardAppearance property to set UIKeyboardAppearanceDark

I simply want the keyboard of UITextView to appear in dark mode. However UItextView doesn't have such a property. Normally for UITextField you can use the following to change the keyboards across the app: [[UITextField appearance]…
Ömer Faruk Gül
  • 965
  • 1
  • 10
  • 22
14
votes
6 answers

Format text in UITextView

I am making an "About Page" for my application, and I have to paste pretty huge amount of text on that page (text will not be editable). I am using a UITextView for this purpose. However, I need some words to be in bold (like headings). But I am not…
Shradha
  • 991
  • 3
  • 13
  • 38
14
votes
2 answers

UITextView textContainerInset not respecting bottom inset value

I have a UIView displaying an NSAttributedString. It's set up to resize to fit its contents. I'd like to create some padding between the text and the view, however it's not quite working. If I do this... view.textContainerInset = UIEdgeInsetsMake(0,…
tarmes
  • 15,366
  • 10
  • 53
  • 87
14
votes
5 answers

In iOS7 Text Magnifier isn't working app wide

I have a came across a rather annoying bug in one of my apps. In iOS7 when I hold down on a UITextView or UITextField to bring up the Magnifying Glass, nothing shows up in the magnified area. This problem is app wide and the only element that ever…
piltdownman7
  • 221
  • 2
  • 6
14
votes
4 answers

Weird thing occurs when using sizetofit of a UITextView in IOS7

When I test my app on IOS7 simulator. Sometimes I found it is weird when I using sizeToFit of a UITextView. The frame after sizeToFit seems right but the text can only show partly just like the photo below. (The gray area represents the UITextView…
echo
  • 1,244
  • 1
  • 16
  • 40
14
votes
9 answers

Dynamic expand UITextView on ios 7

I am using this code CGRect frame = self.mytext.frame; frame.size.height = self.mytext.contentSize.height; self.mytext.frame = frame; But it doesn`t work in iOS 7. Does anyone know why or have the same problem? EDITED: Sorry. I made an UIView, a…
Osvaldo Cipriano
  • 313
  • 1
  • 2
  • 11
14
votes
2 answers

UITextView with white background showing as Color Blended Layer in instruments and simulator

So, i have some UILabels and UITextViews in a Cell. My table was scrolling a little slow and i tried the "Color blending layers" utility available in iOS simulator and Instruments. It show in red the layers that are blending and are causing the slow…
saky
  • 135
  • 1
  • 6
14
votes
1 answer

UITextView and the Mysterious Missing Space

I have an app with a handful of UITextViews of various sizes. It appears that if a UITextView small enough has a font.pointSize high enough, there's no way to add a space after the text is big enough to fill the text view. For example: I'm trying…
D. Patrick
  • 2,894
  • 26
  • 37
14
votes
3 answers

Detect UITextView scroll location

I am trying to implement a form of a Terms & Conditions page where the "Proceed" button is only enabled once the user has scrolled to the bottom of a UITextView. So far I have set my class as a UIScrollView delegate & have implemented the method…
JamesLCQ
  • 341
  • 6
  • 12
13
votes
9 answers

How to implement a simple 'live' word count in a UITextView

I'm trying to implement a simple char count of an UITextView while the user is typing in text (i.e. it should update continuously). I have two problems. (1) The first is that I don't know in which method I should put my charCount method.…
n.evermind
  • 11,944
  • 19
  • 78
  • 122
13
votes
7 answers

Change the UITextView Text Direction

my language is not supported by iOS by default, so unicode is not an option so i am using a embedded true type font on a UITextView it works for the most part, but my issue is like Arabic, and Hebrew my language is written from right to left. So i…
Jinah Adam
  • 1,125
  • 2
  • 14
  • 27