Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Line height in Xcode

Tags:

How do I increase the distance between the lines in Xcode? I mean in the actual code.

Even when I change the font and font sizes in the Xcode preferences, the code lines are still too close together and it is very annoying.

like image 718
Mr H Avatar asked Feb 27 '11 22:02

Mr H


People also ask

How do I change line spacing in Xcode?

Use lineSpacing(_:) to set the amount of spacing from the bottom of one line to the top of the next for text elements in the view. In the Text view in the example below, 10 points separate the bottom of one line to the top of the next as the text field wraps inside this view.

How do I set line height in SwiftUI?

SwiftUI text does not provide a lineHeight property (line spacing is a different beast). You could try to align the 'firstTextBaseLine' to get the desired behaviour. Alternatively, use a 'UILabel' (via 'UIViewRepresentable') with an attributed string (specify line height in the paragraph style).

How do you change the line height in UILabel?

Step #2: Place a UILabel into a Storyboard/XIB and set its class to DesignableLabel . Wait for your project to build (build must succeed!). Step 3: Now you should see a new property in the properties pane named "Line Height". Just set the value you like and you should see the results immediately!

What is line height?

The line-height CSS property sets the height of a line box. It's commonly used to set the distance between lines of text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height.


1 Answers

Also check out the Meslo font; an open source customized version of Menlo that comes with much nicer line-spacing.

like image 136
jonathan Avatar answered Oct 30 '22 02:10

jonathan