Questions tagged [nsmutableparagraphstyle]
7 questions
2
votes
1 answer
Should NSMutableParagraphStyle.paragraphSpacingBefore add space before paragraphs?
Note: It appears that as of macOS Big Sur/11.6.4, this bug has been fixed. The test script now produces the second image instead of the third image when using paragraphSpacingBefore.
I’m writing a command-line script on macOS that creates an image…

Jerry Stratton
- 3,287
- 1
- 22
- 30
1
vote
1 answer
Issue with applying paragraph style in SwiftUI
I have a string of text of Arabic and English words, I need to add attribute using NSMutableAttributedString and add paragraph styling with NSMutableParagraphStyle. The problem is paragraph style doesn't apply to the text and not sure why. First I…

Mc.Lover
- 4,813
- 9
- 46
- 80
0
votes
1 answer
Center text vertically in line of NSMutableAttributedString
I'm using NSMutableAttributedString to setup text style. When I set .minimumLineHeight, it centre text in line to the bottom of line. I would like to customise somehow this alignment to centre text in line vertically.
let paragraphStyle =…

Konstantin.Efimenko
- 1,242
- 1
- 14
- 38
0
votes
1 answer
UILabel, NSMutableParagraphStyle(), NSAttributedString
i am trying to use UIlabel extension + String extension to get a summary result, but lost some of settings of it
Here is UILabel extenstion
extension UILabel {
static func insultString() -> UILabel {
let label = UILabel()
…

kesape
- 149
- 8
0
votes
1 answer
UITextView style is reset when I change kerning
The style is reset when I change kerning. For example, when I change the text size or color, it is saved, but when I change kerning, the style UITextView is reset
@IBAction func sizeTextEdit(_ sender: Any) {
self.textOne?.font =…

Dmitry
- 25
- 8
0
votes
1 answer
How to get the height of a paragraph using PDFKit
I am writing a pdf using iOS PDFKit. Typically I can get the height of a single text item such as a title by doing the following:
return titleStringRect.origin.y + titleStringRect.size.height
Where titleStringRect is the CGRect containing the…

Grant Singleton
- 1,611
- 6
- 17
0
votes
1 answer
Unable to render an NSAttributedString as a 2 column tabbed bullet list in a PDF
I am constructing a large string that is output into a PDF file, but right now, I'd like to have a 2 column, bulleted list in my document. However, I have yet to figure out the correct settings that will allow me to get the desired tabbing…

CodeBender
- 35,668
- 12
- 125
- 132