nstextcontainer Questions

5

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...
Hogle asked 29/10, 2014 at 14:7

2

Solved

This is my code: import UIKit class ViewController: UIViewController { init() { super.init(nibName: nil, bundle: nil) let textView = UITextView(frame: .zero) textView.isScrollEnabled = false...
Across asked 24/5, 2019 at 20:1

3

I'd like to get the index for the tapped character on a UILabel. I've subclassed a UILabel. In my awakeFromNib() I have this: layoutManager = NSLayoutManager() textStorage = NSTextStorage(attrib...

2

Solved

I'm trying to exclude a square in a UITextView using NSTextContainer's excludePaths, like so: NSTextStorage* textStorage = [[NSTextStorage alloc] initWithAttributedString:attributedString]; NSLayo...
Kaluga asked 8/5, 2014 at 12:53

2

Solved

I've been creating UITextViews programatically, using auto layout, in iOS 7. Something like this: _textView = [UITextView new]; _textView.translatesAutoresizingMaskIntoConstraints = NO; _textView....
Selene asked 11/9, 2014 at 8:9

2

Solved

I have a bunch of NSTextViews that I would like to share a single selection. I basically want this to behave like selecting text on a web page, where there are multiple text views but you can drag ...

1

Solved

This is a continuation of Getting CGRect for text in a UITextView for the purpose of highlighting with a CALayer. I'm having trouble with getting the correct rectangle for the ranges in each line f...
Edgaredgard asked 20/12, 2013 at 1:42

2

Solved

I am trying to draw a transparent CALayer in a UITextView in order to highlight matched text in a search. I've figured out the correct way to do this, but still haven't found the correct coordinat...
Diploid asked 15/12, 2013 at 20:33
1

© 2022 - 2024 — McMap. All rights reserved.