<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/adjusting-line-height-in-swiftui-on-ios-26-vlq1lcgxv" -->

---
title: Adjusting line height in SwiftUI on iOS 26 | daily.dev
description: iOS 26 introduces the lineHeight(_:) SwiftUI modifier and AttributedString.LineHeight attribute for controlling baseline distance between lines of text. The...
canonical: https://daily.dev/posts/adjusting-line-height-in-swiftui-on-ios-26-vlq1lcgxv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Adjusting line height in SwiftUI on iOS 26 | daily.dev
og:description: iOS 26 introduces the lineHeight(_:) SwiftUI modifier and AttributedString.LineHeight attribute for controlling baseline distance between lines of text. The...
og:url: https://daily.dev/posts/adjusting-line-height-in-swiftui-on-ios-26-vlq1lcgxv
og:image: https://api.daily.dev/og/posts/Vlq1LcGXV.png
og:image:alt: Adjusting line height in SwiftUI on iOS 26
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Adjusting line height in SwiftUI on iOS 26

**[Nil Coalescing](https://daily.dev/sources/nilcoalescing)** · 5 min read · 0 upvotes · 0 comments

## Summary

iOS 26 introduces the lineHeight(_:) SwiftUI modifier and AttributedString.LineHeight attribute for controlling baseline distance between lines of text. The API offers preset options (loose, tight, normal, variable) and precise methods: multiple(factor:) for proportional scaling, leading(increase:) for relative-plus-fixed spacing, and exact(points:) for fixed point values. A comparison with the existing lineSpacing(_:) modifier clarifies that lineHeight measures baseline-to-baseline distance while lineSpacing measures bottom-of-line to top-of-next. The older leading(_:) font modifier (available since iOS 14) is also discussed as a more limited alternative. Caution is advised when using exact(points:) since it does not scale with Dynamic Type and can cause text overlap at larger font sizes.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://nilcoalescing.com/blog/AdjustingLineHeightInSwiftUIOniOS26>

## Similar posts on daily.dev

- [How to change line height in SwiftUI](https://daily.dev/posts/how-to-change-line-height-in-swiftui-ciwisnlpj) · Sarunw · 0 upvotes · 0 comments

---

Tags: [#ios](https://daily.dev/tags/ios), [#swift](https://daily.dev/tags/swift), [#swiftui](https://daily.dev/tags/swiftui), [#typography](https://daily.dev/tags/typography)

[View this post on daily.dev](https://daily.dev/posts/adjusting-line-height-in-swiftui-on-ios-26-vlq1lcgxv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Adjusting line height in SwiftUI on iOS 26","url":"https://daily.dev/posts/adjusting-line-height-in-swiftui-on-ios-26-vlq1lcgxv","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/adjusting-line-height-in-swiftui-on-ios-26-vlq1lcgxv"},"datePublished":"2026-08-02T07:15:18.656Z","dateModified":"2026-08-24T06:54:17.399Z","description":"iOS 26 introduces the lineHeight(_:) SwiftUI modifier and AttributedString.LineHeight attribute for controlling baseline distance between lines of text. The...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c05009eff5eb59fb5f8a0a4719929005?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c05009eff5eb59fb5f8a0a4719929005?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Nil Coalescing","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Nil Coalescing","logo":"https://media.daily.dev/image/upload/s--rcEu6sag--/f_auto,q_auto/v1785654899/logos/nilcoalescing?_a=BAMAMicg0","url":"https://daily.dev/sources/nilcoalescing"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/adjusting-line-height-in-swiftui-on-ios-26-vlq1lcgxv","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ios,swift,swiftui,typography","timeRequired":"PT5M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Nil Coalescing","item":"https://daily.dev/sources/nilcoalescing"},{"@type":"ListItem","position":3,"name":"Adjusting line height in SwiftUI on iOS 26"}]}
```

